gh-issue-update-comment
This promotion step is only available in Kargo on the Akuity Platform, versions v1.11.0 and above.
The gh-issue-update-comment step replaces the body of an existing comment on a
GitHub issue or pull request. The commentID is typically sourced from a
gh-issue-add-comment step output in the same
stage, but any valid GitHub comment ID may be 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. |
commentID | integer | Y | The ID of the comment to update. Typically from gh-issue-add-comment output, but any valid GitHub comment ID may be provided. |
body | string | Y | The new body text of the comment. Replaces the existing body. Supports GitHub Flavored Markdown. |
Output
| Name | Type | Description |
|---|---|---|
commentID | integer | The ID of the updated comment (same value passed as input, echoed for convenience). |
url | string | The HTML URL of the updated comment. |
Example
This example posts a "promotion started" comment and then updates it with the final outcome:
steps:
- as: post-comment
uses: gh-issue-add-comment
config:
repoURL: https://github.com/myorg/myrepo
issueNumber: ${{ freightMetadata(ctx.targetFreight.name)['github-issue-number'] }}
body: "Promotion to **${{ ctx.stage }}** is in progress..."
# ... your promotion steps ...
- uses: gh-issue-update-comment
config:
repoURL: https://github.com/myorg/myrepo
commentID: ${{ outputs['post-comment'].commentID }}
body: "Promotion to **${{ ctx.stage }}** completed successfully."