Skip to content

Latest commit

 

History

History
68 lines (57 loc) · 2.77 KB

issues-update-comment.md

File metadata and controls

68 lines (57 loc) · 2.77 KB

Update comment on Issue

A composite action for adding labels to github issues. This requires issues: write permissions in order to work correctly.

Inputs

Name Description Default
body (*) The body of the comment to update the message to N/A
comment-id (*) The ID of the comment to update N/A
github-token The default token to use for this Git operation. If unspecified, this will default to github.token. "${{ github.token }}"
owner The repository owner. If unspecified, this will default to the owner of the current repository. ""
repo The name of the repository. If unspecified, this will default to the current repository. ""
retries The number of times to attempt to retry if this fails. "0"
retry-exempt-status-codes A list of error-codes that are exempt from being retried. "400,401,403,404,422"

Note: (*) marks required inputs

Outputs

Name Description
body The body of the comment
comment-id The ID of the updated comment
comment-url The URL of the comment that is updated
time-since-create The amount of time since the pull request was created
time-since-last-update The amount of time since the pull request was last updated
user-login The user-login who made the comment

Example

Here is a very basic example of how to use the issues/update-comment composite action in a project (placeholders are used in place of real inputs):

run:
  example-job:
    # ... 
    steps:
      # ... 
      - name: Update comment on Issue
        id: issues-update-comment # only necessary if using this action's output(s)
        uses: bitwizeshift/actions-github/issues/update-comment@v1
        with:
          # Required inputs
          body: BODY
          comment-id: COMMENT_ID

          # Optional inputs
          github-token: GITHUB_TOKEN
          owner: OWNER
          repo: REPO
          retries: RETRIES
          retry-exempt-status-codes: RETRY_EXEMPT_STATUS_CODES
      # ... 
      - name: Uses "Update comment on Issue" Outputs
        uses: example-actions/use-issues-update-comment@v3 # illustrative
        with:
          use-body: ${{ steps.issues-update-comment.outputs.body }}
          use-comment-id: ${{ steps.issues-update-comment.outputs.comment-id }}
          use-comment-url: ${{ steps.issues-update-comment.outputs.comment-url }}
          use-time-since-create: ${{ steps.issues-update-comment.outputs.time-since-create }}
          use-time-since-last-update: ${{ steps.issues-update-comment.outputs.time-since-last-update }}
          use-user-login: ${{ steps.issues-update-comment.outputs.user-login }}