Skip to content

Commit

Permalink
Require reviewer checklist (#13601)
Browse files Browse the repository at this point in the history
* Create require-checklist.yml

* Add debug

* Fix github event

* Add repofullname and prnum

* Fix repo path

* Avoid empty vars

* Simplify

* Fixes

* Cleanup

* trigger on pr to master only

* mplesa review

* trigger on 1.* branch

* Switch to `gh pr`. Sed for printing.
  • Loading branch information
kim0 authored Jun 8, 2022
1 parent b2bf8f3 commit d832ebd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/require-checklist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Require Reviewer Checklist

on:
pull_request:
types: [opened, reopened, edited, synchronize]
branches: [master, 1.*]

jobs:
require-reviewer-checklist:
runs-on: ubuntu-latest
steps:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_NAME: ${{ github.event.repository.full_name }}
PR_NUMBER: ${{ github.event.number }}
run: |
if gh pr view "$PR_NUMBER" -R "$REPO_NAME" --json body --jq '.body' | sed -n '/## Reviewer Checklist/,/## After-merge Checklist/p' | grep '\[ \]'; then
echo "Found unchecked reviewer items. Failing..."
exit 1
fi

0 comments on commit d832ebd

Please sign in to comment.