https://github.com/python/cpython/commit/ced2691de4c9500ac9a5ccded00741a5fc2d9d2c
commit: ced2691de4c9500ac9a5ccded00741a5fc2d9d2c
branch: main
author: Ɓukasz Langa <[email protected]>
committer: ambv <[email protected]>
date: 2024-10-28T17:15:46Z
summary:

gh-126081: For PRs labeled with "type-feature", require a core review 
(GH-126082)

Co-authored-by: Hugo van Kemenade <[email protected]>

files:
M .github/workflows/require-pr-label.yml

diff --git a/.github/workflows/require-pr-label.yml 
b/.github/workflows/require-pr-label.yml
index ff5cbdf3eda749..bbedd22cc6d189 100644
--- a/.github/workflows/require-pr-label.yml
+++ b/.github/workflows/require-pr-label.yml
@@ -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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to