Skip to content

Create or Update Unique Comment

Actions
Create or update a comment on an issue or pull request. Composite of find-comment and create-or-update-comment actions
v1.1.0
Latest
Star (0)

Tags

 (1)

Create or Update Unique Comment Action

CI GitHub Marketplace

A GitHub action to create or update a unique comment on a PR or Issue. If the comment already exists, it will update the comment.

This action is a composite of peter-evans/create-or-update-comment and peter-evans/find-comment actions.

Usage

Example

jobs:
  create-or-update-unique-comment:
    permissions:
      pull-requests: write

    steps:
      - name: Create comment
        uses: ovsds/create-or-update-unique-comment-action@v1
        with:
          issue-number: 1
          body: |
            Example comment body that contains unique part to identify the comment.
            And some more text that is dynamic.
          unique-body-includes: |
            Example comment body that contains unique part to identify the comment.

Action Inputs

Action inputs are mostly the same as in create-or-update-comment.

Name Description Default
token GITHUB_TOKEN (issues: write, pull-requests: write) or a repo scoped PAT. GITHUB_TOKEN
repository The full name of the repository in which to create or update a comment. Current repository
issue-number The number of the issue or pull request in which to create a comment.
body The comment body. Cannot be used in conjunction with body-path.
body-path The path to a file containing the comment body. Cannot be used in conjunction with body.
edit-mode The mode when updating a comment, replace or append. replace
append-separator The separator to use when appending to an existing comment. (newline, space, none) newline
reactions A comma or newline separated list of reactions to add to the comment. (+1, -1, laugh, confused, heart, hooray, rocket, eyes)
reactions-edit-mode The mode when updating comment reactions, replace or append. replace
comment-author The author of the comment to search for.
unique-body-includes A string to search for in the body of comments, originally body-includes.
unique-body-regex A regular expression to search for in the body of comments, originally body-regex.
find-direction Search direction, specified as first or last, originally direction. first
find-nth 0-indexed number, specifying which comment to return if multiple are found, originally nth 0
delete Delete the comment instead of updating if it is found or skip creation. false

Action Outputs

Name Description
comment-id The ID of the comment.

Development

Global dependencies

Taskfile commands

For all commands see Taskfile or task --list-all.

License

MIT

Create or Update Unique Comment is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Create or update a comment on an issue or pull request. Composite of find-comment and create-or-update-comment actions
v1.1.0
Latest

Tags

 (1)

Create or Update Unique Comment is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.