https://github.com/open-turo/action-conditional-pr-comment
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.
https://github.com/open-turo/action-conditional-pr-comment
action actions ci gha github
Last synced: 4 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/open-turo/action-conditional-pr-comment
- Owner: open-turo
- License: mit
- Created: 2022-10-25T22:40:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-29T00:09:12.000Z (about 1 year ago)
- Last Synced: 2024-05-29T14:28:53.352Z (about 1 year ago)
- Topics: action, actions, ci, gha, github
- Language: Shell
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# action-conditional-pr-comment
[](https://github.com/open-turo/eslint-config-typescript/releases/)
[](https://github.com/open-turo/action-renovate/actions/)
[](./LICENSE)
[](https://github.com/dwyl/esta/issues)

[](https://github.com/semantic-release/semantic-release)
[](https://conventionalcommits.org)
[](https://turo.com/jobs)## Description
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.
## Usage
```yaml
- uses: open-turo/action-conditional-pr-comment@
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-commentgithub-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: fixmecomment-author:
# The author of the comment upon addition.
#
# Required: false
# Default: open-turo-botedit-mode:
# The mode when updating a comment, "replace" or "append".
#
# Required: false
# Default: append
```## Inputs
| 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` |## Runs
This action is a `composite` action.
## Development
Install [pre-commit](https://pre-commit.com/) and the commit hooks:
```shell
pre-commit install
pre-commit install --hook-type commit-msg
```## Get Help
Please review Issues, post new Issues against this repository as needed.
## Contributions
Please see [here](https://github.com/open-turo/contributions) for guidelines on
how to contribute to this project.