Skip to content

Commit

Permalink
pythongh-126081: For PRs labeled with "type-feature", require a core …
Browse files Browse the repository at this point in the history
…review (pythonGH-126082)

Co-authored-by: Hugo van Kemenade <[email protected]>
  • Loading branch information
ambv and hugovk authored Oct 28, 2024
1 parent 2544159 commit ced2691
Showing 1 changed file with 42 additions and 4 deletions.
46 changes: 42 additions & 4 deletions .github/workflows/require-pr-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,53 @@ permissions:
pull-requests: write

jobs:
label:
name: DO-NOT-MERGE / unresolved review
label-dnm:
name: DO-NOT-MERGE
if: github.repository_owner == 'python'
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: mheap/github-action-required-labels@v5
- name: Check there's no DO-NOT-MERGE
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 0
labels: "DO-NOT-MERGE, awaiting changes, awaiting change review"
labels: |
DO-NOT-MERGE
label-reviews:
name: Unresolved review
if: github.repository_owner == 'python'
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
# Check that the PR is not awaiting changes from the author due to previous review.
- name: Check there's no required changes
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 0
labels: |
awaiting changes
awaiting change review
- id: is-feature
name: Check whether this PR is a feature (contains a "type-feature" label)
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: |
type-feature
exit_type: success # don't fail the check if the PR is not a feature, just record the result
# In case of a feature PR, check for a complete review (contains an "awaiting merge" label).
- id: awaiting-merge
if: steps.is-feature.outputs.status == 'success'
name: Check for complete review
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: |
awaiting merge

0 comments on commit ced2691

Please sign in to comment.