GitHub Action that supports instructing the author of a Pull Request (PR) how to resolve a given problem within the context of a PR. Conditionally adds a comment to the PR with resolution instructions, and once the condition is found to be resolved, allows the previously added comment, if one exists at that time, to be removed from the PR.
- uses: open-turo/action-conditional-pr-comment@<version>
with:
workflow:
# ADD indicates the comment is to be added/updated to/within the PR, REMOVE indicates the comment is to be removed from the PR.
#
# Required: true
# Default: ""
text-detector:
# This is some unique verbatim subset of the comment that is to be used to determine if a comment has already been created against the PR that instructs the author how to resolve the given problem.
#
# Required: true
# Default: created by action-conditional-pr-comment
github-token:
# GitHub token that can add/update/delete comments. e.g. 'secrets.GITHUB_TOKEN'
#
# Required: true
# Default: ""
comment:
# This is the full text of the message to be placed within a comment of the given PR to instruct the author of the PR how to resolve a given problem. This value should be provided for all ADD workflows.
#
# Required: false
# Default: fixme
comment-author:
# The author of the comment upon addition.
#
# Required: false
# Default: open-turo-bot
edit-mode:
# The mode when updating a comment, "replace" or "append".
#
# Required: false
# Default: append
name | description | required | default |
---|---|---|---|
workflow |
ADD indicates the comment is to be added/updated to/within the PR, REMOVE indicates the comment is to be removed from the PR. |
true |
"" |
text-detector |
This is some unique verbatim subset of the comment that is to be used to determine if a comment has already been created against the PR that instructs the author how to resolve the given problem. |
true |
created by action-conditional-pr-comment |
github-token |
GitHub token that can add/update/delete comments. e.g. 'secrets.GITHUB_TOKEN' |
true |
"" |
comment |
This is the full text of the message to be placed within a comment of the given PR to instruct the author of the PR how to resolve a given problem. This value should be provided for all ADD workflows. |
false |
fixme |
comment-author |
The author of the comment upon addition. |
false |
open-turo-bot |
edit-mode |
The mode when updating a comment, "replace" or "append". |
false |
append |
This action is a composite
action.
Install pre-commit and the commit hooks:
pre-commit install
pre-commit install --hook-type commit-msg
Please review Issues, post new Issues against this repository as needed.
Please see here for guidelines on how to contribute to this project.