Skip to content

Commit 5e5c5fa

Browse files
ambvhugovk
authored andcommitted
pythongh-126081: For PRs labeled with "type-feature", require a core review (pythonGH-126082)
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 574ec0e commit 5e5c5fa

File tree

1 file changed

+42
-4
lines changed

1 file changed

+42
-4
lines changed

.github/workflows/require-pr-label.yml

+42-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,53 @@ permissions:
99
pull-requests: write
1010

1111
jobs:
12-
label:
13-
name: DO-NOT-MERGE / unresolved review
12+
label-dnm:
13+
name: DO-NOT-MERGE
1414
if: github.repository_owner == 'python'
1515
runs-on: ubuntu-latest
1616
timeout-minutes: 10
1717

1818
steps:
19-
- uses: mheap/github-action-required-labels@v5
19+
- name: Check there's no DO-NOT-MERGE
20+
uses: mheap/github-action-required-labels@v5
2021
with:
2122
mode: exactly
2223
count: 0
23-
labels: "DO-NOT-MERGE, awaiting changes, awaiting change review"
24+
labels: |
25+
DO-NOT-MERGE
26+
27+
label-reviews:
28+
name: Unresolved review
29+
if: github.repository_owner == 'python'
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 10
32+
33+
steps:
34+
# Check that the PR is not awaiting changes from the author due to previous review.
35+
- name: Check there's no required changes
36+
uses: mheap/github-action-required-labels@v5
37+
with:
38+
mode: exactly
39+
count: 0
40+
labels: |
41+
awaiting changes
42+
awaiting change review
43+
- id: is-feature
44+
name: Check whether this PR is a feature (contains a "type-feature" label)
45+
uses: mheap/github-action-required-labels@v5
46+
with:
47+
mode: exactly
48+
count: 1
49+
labels: |
50+
type-feature
51+
exit_type: success # don't fail the check if the PR is not a feature, just record the result
52+
# In case of a feature PR, check for a complete review (contains an "awaiting merge" label).
53+
- id: awaiting-merge
54+
if: steps.is-feature.outputs.status == 'success'
55+
name: Check for complete review
56+
uses: mheap/github-action-required-labels@v5
57+
with:
58+
mode: exactly
59+
count: 1
60+
labels: |
61+
awaiting merge

0 commit comments

Comments
 (0)