GitHub Comment

GitHub Comment

Certified

Add or update an issue comment

Posts a comment on an existing GitHub issue or pull request. By default a new comment is created on each run. Set commentId to update a specific comment in place, or set updateTag to keep a single, continuously-updated comment (for example a test report that is refreshed on every run instead of piling up new comments). The authenticated token must be allowed to read the repository and comment on the issue.

yaml
type: io.kestra.plugin.github.issues.Comment

Put a comment on an issue in a repository.

yaml
id: github_comment_on_issue_flow
namespace: company.team

tasks:
  - id: comment_on_issue
    type: io.kestra.plugin.github.issues.Comment
    oauthToken: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
    repository: kestra-io/kestra
    issueNumber: 1347
    body: "{{ execution.id }} has failed on {{ taskrun.startDate }}. See the link below for more details"

Keep a single, self-updating test report comment on a pull request. Using updateTag, the task looks for a previous comment carrying the same tag and updates it in place, otherwise it creates a new one.

yaml
id: github_report_test_results
namespace: company.team

tasks:
  - id: report
    type: io.kestra.plugin.github.issues.Comment
    oauthToken: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
    repository: kestra-io/kestra
    issueNumber: 1347
    updateTag: test-report
    body: |
      ## Test report
      {{ outputs.tests.report }}

Update a specific comment by its identifier.

yaml
id: github_update_comment
namespace: company.team

tasks:
  - id: update_comment
    type: io.kestra.plugin.github.issues.Comment
    oauthToken: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
    repository: kestra-io/kestra
    issueNumber: 1347
    commentId: 1234567890
    body: "Updated at {{ now() }}"
Properties

Issue number

Numeric issue identifier within the repository. Pull requests share the same numbering as issues.

GitHub App installation token

Installation access token generated by a GitHub App. Use this for repository-scoped app access instead of a user token.

Comment body

Markdown body to post as the issue comment. This value is rendered before the request is sent

Comment ID

Identifier of an existing comment to update in place. When set, the task updates that comment instead of creating a new one and fails if no comment with this id exists on the issue. Takes precedence over updateTag.

GitHub API endpoint

GitHub or GitHub Enterprise API base URL such as https://api.github.com or https://ghe.acme.com/api/v3. Set this when targeting GitHub Enterprise or a non-default API endpoint.

GitHub JWT token

GitHub App JWT used for app-level authentication. Use this when the task should authenticate as the app rather than a user.

GitHub login

GitHub login used with oauthToken for authenticated requests. Leave unset when authenticating with jwtToken or appInstallationToken.

GitHub OAuth token

GitHub personal access token used for authenticated requests. Can be used alone or with login.

Reference (ref) of the pluginDefaults to apply to this task.

Target repository

Repository in owner/repo format containing the issue

Update tag

A stable identifier used to keep a single, continuously-updated comment. It is embedded in the comment body as a hidden HTML marker. When set, the task looks for an existing comment on the issue carrying the same tag and updates it in place; if none is found, a new tagged comment is created. Ideal for recurring reports (e.g. a test report) where you want one comment that gets refreshed instead of a new comment on every run. Ignored when commentId is set.

Comment ID

Identifier of the created or updated comment. Feed this back into commentId to update the same comment later.

Comment URL

GitHub URL for the created or updated comment

Definitions
authoritystring
filestring
hoststring
portinteger
protocolstring
refstring

Issue URL

GitHub URL for the issue that received the comment

Definitions
authoritystring
filestring
hoststring
portinteger
protocolstring
refstring

Updated

true when an existing comment was updated in place, false when a new comment was created.