PR Cop 2.0 (#5815)

* PR Cop

* Update the PR Template

* address review comments
This commit is contained in:
John Hill 2023-12-14 10:55:51 -08:00 committed by GitHub
parent 7f95325816
commit 4075a31d96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 8 deletions

View File

@ -14,8 +14,10 @@ Closes <!--- Insert Issue Number(s) this PR addresses. Start by typing # will op
* [ ] Changes address original issue?
* [ ] Tests included and/or updated with changes?
* [ ] Command line build passes?
* [ ] Has this been smoke tested?
* [ ] Have you associated this PR with a `type:` label? Note: this is not necessarily the same as the original issue.
* [ ] Have you associated a milestone with this PR? Note: leave blank if unsure.
* [ ] Is this a breaking change to be called out in the release notes?
* [ ] Testing instructions included in associated issue OR is this a dependency/testcase change?
### Reviewer Checklist
@ -25,5 +27,3 @@ Closes <!--- Insert Issue Number(s) this PR addresses. Start by typing # will op
* [ ] Changes appear not to be breaking changes?
* [ ] Appropriate automated tests included?
* [ ] Code style and in-line documentation are appropriate?
* [ ] Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
* [ ] Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)

View File

@ -3,17 +3,17 @@ name: PRCop
on:
pull_request:
types:
- labeled
- unlabeled
- opened
- reopened
- edited
- synchronize
- ready_for_review
- review_requested
- review_request_removed
- edited
pull_request_review_comment:
types:
- created
env:
LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }}
jobs:
prcop:
runs-on: ubuntu-latest
@ -24,3 +24,15 @@ jobs:
with:
config-file: '.github/workflows/prcop-config.json'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
check-type-label:
name: Check type Label
runs-on: ubuntu-latest
steps:
- if: contains( env.LABELS, 'type:' ) == false
run: exit 1
check-milestone:
name: Check Milestone
runs-on: ubuntu-latest
steps:
- if: github.event.pull_request.milestone == null && contains( env.LABELS, 'no milestone' ) == false
run: exit 1