Skip to content

Commit

Permalink
Add label checking for group reviews (#153)
Browse files Browse the repository at this point in the history
* Feat: Add ability to check for a label marking a group review approval

* Docs(ci): Add documentation about group review label

* Docs(ci): Add example of GitHub CLI adding a label to a pr
  • Loading branch information
kdvalin authored Jan 22, 2025
1 parent 03e68e7 commit d337a5c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check_review_label.yaml
Original file line number Diff line number Diff line change
@@ -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"

7 changes: 7 additions & 0 deletions ci/README.md
Original file line number Diff line number Diff line change
@@ -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 <PR NUMBER> --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.

Expand Down

0 comments on commit d337a5c

Please sign in to comment.