Skip PR labeled with merge

This commit is contained in:
Nicola Soranzo
2020-12-02 13:27:18 +00:00
committed by GitHub
parent 7f60a7a021
commit 681c8a0a6f
+3 -2
View File
@@ -11,10 +11,11 @@ jobs:
- name: Check Labels on merge
if: |
github.event.pull_request.merged == true &&
! contains(join(github.event.pull_request.labels.*.name, ', '), 'kind/')
! contains(join(github.event.pull_request.labels.*.name, ', '), 'kind/') &&
! contains(github.event.pull_request.labels.*.name, 'merge')
uses: actions/github-script@0.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { issue: { number: issue_number }, repo: { owner, repo } } = context;
github.issues.createComment({ issue_number, owner, repo, body: 'This PR was merged without a "kind/" label, please correct.' })
github.issues.createComment({ issue_number, owner, repo, body: 'This PR was merged without a "kind/" label, please correct.' })