File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Check PR Base
2+ on :
3+ pull_request :
4+ types : [opened, edited]
5+ jobs :
6+ check-pr-base :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - name : Reject PR due to incorrect base
10+ if : github.base_ref != 'dev' && (github.event.action == 'opened' || (github.event.action == 'edited' && github.event.changes.base.ref))
11+ uses : andrewmusgrave/automatic-pull-request-review@0.0.5
12+ with :
13+ repo-token : ${{ secrets.GITHUB_TOKEN }}
14+ event : REQUEST_CHANGES
15+ body : ' Please change your PR base to dev branch.'
16+ - name : Approve PR because it's based against dev branch
17+ if : github.base_ref == 'dev' && github.event.changes.base && github.event.changes.base.ref.from != 'dev'
18+ uses : andrewmusgrave/automatic-pull-request-review@0.0.5
19+ with :
20+ repo-token : ${{ secrets.GITHUB_TOKEN }}
21+ event : APPROVE
22+ body : ' Your PR is based against the dev branch. Looks good.'
You can’t perform that action at this time.
0 commit comments