diff --git a/.github/workflows/check_review_label.yaml b/.github/workflows/check_review_label.yaml new file mode 100644 index 0000000..e850681 --- /dev/null +++ b/.github/workflows/check_review_label.yaml @@ -0,0 +1,20 @@ +name: Verify group review + +on: + pull_request: + types: + - opened + - labeled + +env: + TARGET_LABEL: 'group_review_lgtm' + +jobs: + check_review_label: + runs-on: ubuntu-latest + steps: + - run: echo "::error Missing review label" && exit 1 + if: "!contains(github.event.pull_request.labels.*.name, env.TARGET_LABEL)" + + - run: echo "Has review label" + diff --git a/ci/README.md b/ci/README.md index f5127c2..b77bdea 100644 --- a/ci/README.md +++ b/ci/README.md @@ -1,5 +1,12 @@ # Workflows in this repository +## Verify group review +This workflow requires PRs to have an additional label before they can be merged into the main branch. Currently the label is `group_review_lgtm`, which is intended to be issued once the PR has been through a group review. + +This can be done via the GitHub CLI by using the command +`gh pr edit --add-label group_review_lgtm`. + + ## Verify PR has JIRA ticket and issue number This workflow is designed to enforce requirements for PR descriptions. At bare minimum it requires the PR to mention a related issue and mention the Jira Ticket number. Both of these are required since Sync2Jira does not know how to associate a PR with a Jira Ticket from the originating GitHub issue.