Check the PR CI status and perform some operation after success or failure.
Since CI execution takes time, this Action only support schedule
trigger.
name: Check PR CI
on:
schedule:
- cron: "*/10 * * * *"
jobs:
check-pr-ci:
runs-on: ubuntu-latest
steps:
- uses: actions-cool/check-pr-ci@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter-label: 'check-ci'
filter-creator-authority: 'write'
filter-head-ref: 'master, feature'
filter-support-fork: false
success-review: true
success-review-body: 'LGTM'
success-merge: true
merge-method: 'merge'
merge-title: 'Auto merge (#${number})'
failure-review: 'REQUEST_CHANGES'
failure-review-body: 'PTAL'
failure-close: true
Name | Desc | Type | Required |
---|---|---|---|
token | GitHub token | string | ✖ |
filter-label | Filter PR by label. | string | ✖ |
filter-creator | Filter PR by creator name. | string | ✖ |
filter-creator-authority | Filter PR by creator authority. | string | ✖ |
filter-head-ref | Filter PR head ref branch. | string | ✖ |
filter-support-fork | Filter PR come from. Default true . |
boolean | ✖ |
skip-run-names | Skip some run names. | string | ✖ |
success-review | Whether to approve when success. | boolean | ✖ |
success-review-body | Review body. | string | ✖ |
success-merge | Whether to merge when success. | boolean | ✖ |
conflict-review-body | Comment when has conflict. | string | ✖ |
merge-method | Merge method to use. Possible values are merge , squash or rebase . Default is merge . |
string | ✖ |
merge-title | Title for the automatic merge. | string | ✖ |
merge-message | Extra detail to append to automatic merge. | string | ✖ |
failure-review | Include REQUEST_CHANGES or COMMENT. | string | ✖ |
failure-review-body | Review body. | string | ✖ |
failure-close | Whether close PR. | boolean | ✖ |
merge-title
:${number}
will be replaced with the current PR numberconflict-review-body
: Default is😅 This branch has conflicts that must be resolved!
failure-review
: When use this, thefailure-review-body
is necessaryskip-run-names
: GitHub Doccheck_runs
name
. When you merge default branch into another, you should addcheck-pr-ci
(The jobs name)
You are very welcome to try it out and put forward your comments. You can use the following methods:
- Report bugs or consult with Issue
- Submit Pull Request to improve the code of
check-pr-ci
也欢迎加入 钉钉交流群