gh-update-issue
This promotion step is only available in Kargo on the Akuity Platform, versions v1.11.0 and above.
The gh-update-issue step modifies an existing GitHub issue. At least one
optional field (title, body, state, addLabels, removeLabels, or
assignees) must be set — the step will fail validation if only repoURL and
issueNumber are provided.
GitHub Issues integration for Kargo is a group of promotion steps:
- gh-issue-add-comment
- gh-create-issue
- gh-issue-delete-comment
- gh-search-issues
- gh-issue-update-comment
- gh-update-issue
- gh-wait-for-issue-state
Credentials
These steps use the same
repository credentials
that git-clone and git-open-pr use
for the same repository. If you have already configured a Git credential for
the repoURL, no additional setup is required.
The GitHub token must have Issues: Read and write access for the repository
(or the repo scope for a classic personal access token).
Configuration
| Name | Type | Required | Description |
|---|---|---|---|
repoURL | string | Y | The URL of the GitHub repository (e.g. https://github.com/owner/repo). |
insecureSkipTLSVerify | boolean | N | If true, TLS verification of the GitHub server certificate is skipped. Use only for GitHub Enterprise Server instances with self-signed certificates. |
issueNumber | integer | Y | The number of the issue to update. |
title | string | N | New title for the issue. |
body | string | N | New body text for the issue. Supports GitHub Flavored Markdown. Pass an empty string ("") to clear the existing body. |
state | string | N | Set the issue state to open or closed. |
addLabels | []string | N | Labels to add to the issue. Labels must already exist in the repository. |
removeLabels | []string | N | Labels to remove from the issue. Pass ["*"] to remove all existing labels (any other entries in the list are ignored when "*" is present). |
assignees | []string | N | Replace the issue's assignee list with these GitHub usernames. Pass an empty list to remove all assignees. GitHub allows a maximum of 10 assignees per issue; entries beyond 10 are silently ignored. |
addLabels and removeLabels are computed against the issue's current label
set, so they can be used together safely. If the same label appears in both
lists, the add takes precedence. Pass ["*"] in removeLabels to clear all
existing labels; any labels in addLabels are then applied on top of the empty
set.
Output
This step does not produce any output.
Example
This example closes an issue and adds a released label when promotion to
production succeeds:
steps:
# ... your promotion steps ...
- uses: gh-update-issue
config:
repoURL: https://github.com/myorg/myrepo
issueNumber: ${{ freightMetadata(ctx.targetFreight.name)['github-issue-number'] }}
state: closed
addLabels:
- released
- "env-prod"
removeLabels:
- "env-staging"