https://github.com/yuler/pr-comment-trigger
https://github.com/yuler/pr-comment-trigger
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuler/pr-comment-trigger
- Owner: yuler
- License: mit
- Created: 2021-09-18T05:28:48.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-14T01:49:49.000Z (over 3 years ago)
- Last Synced: 2025-04-06T12:13:19.375Z (about 1 year ago)
- Language: TypeScript
- Size: 269 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# PR Comment Trigger
> Trigger match on pull request comment. Automatic cancel workflow when mismatch trigger.
## Usage
```yml
name: PR Comment Trigger
on:
issue_comment:
types: [created]
jobs:
pr_commented:
runs-on: ubuntu-latest
steps:
- uses: yuler/pr-comment-trigger@main
id: 'pr'
with:
trigger: '/trigger'
- name: Echo # sleep 2s wait for cancel
run: |
sleep 2 # sleep 2s wait for cancel
echo Trigger
- uses: actions/checkout@v2
with:
ref: ${{ steps.pr.outputs.branch }}
```
## Inputs
`trigger`: The string match starts with it in pull request comment. For example '/trigger'
## Outputs
`branch`: The pull request branch
## Refs
- https://github.com/Khan/pull-request-comment-trigger