comment-on-pr/README.md

31 lines
774 B
Markdown
Raw Normal View History

2019-05-24 23:48:10 +08:00
# Comment on PR via GitHub Action
A GitHub action to comment on the relevant open PR when a commit is pushed.
## Usage
- Requires the `GITHUB_TOKEN` secret.
2019-09-25 23:00:08 +08:00
- Requires the comment's message in the `msg` parameter.
- Supports `push` and `pull_request` event types.
2019-05-24 23:48:10 +08:00
### Sample workflow
```yaml
2019-09-25 23:00:08 +08:00
name: comment-on-pr example
on: pull_request
jobs:
example:
name: sample comment
runs-on: ubuntu-latest
steps:
- name: comment PR
2022-01-06 06:39:30 +08:00
uses: unsplash/comment-on-pr@v1.3.1
2019-09-25 23:00:08 +08:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "Check out this message!"
check_for_duplicate_msg: false # OPTIONAL
delete_prev_regex_msg: "[0-9]" # OPTIONAL
2021-10-02 04:08:55 +08:00
duplicate_msg_pattern: "[A-Z]" # OPTIONAL
2019-05-24 23:48:10 +08:00
```