Skip to content

ovsds/create-or-update-unique-comment-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

df30f5f · Nov 26, 2024

History

8 Commits
Nov 26, 2024
Nov 26, 2024
Apr 13, 2024
Jul 17, 2024
Apr 13, 2024
Apr 13, 2024
Jul 17, 2024
Nov 26, 2024
Nov 26, 2024
Nov 26, 2024
Apr 13, 2024
Nov 26, 2024
Nov 26, 2024

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks