gh-issue-delete-comment
This promotion step is only available in Kargo on the Akuity Platform, versions v1.11.0 and above.
The gh-issue-delete-comment step removes a comment from a GitHub issue or pull
request. It is typically used in if: ${{ failure() }} cleanup steps to remove
progress comments posted by a gh-issue-add-comment
step, 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 delete. Typically from gh-issue-add-comment output, but any valid GitHub comment ID may be provided. |
Output
This step does not produce any output.
Example
This example deletes a progress comment if the promotion fails:
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-delete-comment
if: ${{ failure() && status('post-comment') == 'Succeeded' }}
config:
repoURL: https://github.com/myorg/myrepo
commentID: ${{ outputs['post-comment'].commentID }}