2023-04-09 08:39:03 +02:00
|
|
|
name: Check labels
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [opened, reopened, labeled, unlabeled, synchronize]
|
|
|
|
|
2023-05-09 12:29:00 +02:00
|
|
|
permissions:
|
2023-09-12 21:03:55 +02:00
|
|
|
issues: write
|
|
|
|
pull-requests: write
|
2023-05-09 12:29:00 +02:00
|
|
|
|
2023-04-09 08:39:03 +02:00
|
|
|
jobs:
|
2024-10-28 18:15:46 +01:00
|
|
|
label-dnm:
|
|
|
|
name: DO-NOT-MERGE
|
2024-01-31 12:32:27 +01:00
|
|
|
if: github.repository_owner == 'python'
|
2023-04-09 08:39:03 +02:00
|
|
|
runs-on: ubuntu-latest
|
2023-04-14 11:01:10 +02:00
|
|
|
timeout-minutes: 10
|
2023-04-09 08:39:03 +02:00
|
|
|
|
|
|
|
steps:
|
2024-10-28 18:15:46 +01:00
|
|
|
- name: Check there's no DO-NOT-MERGE
|
|
|
|
uses: mheap/github-action-required-labels@v5
|
2023-04-09 08:39:03 +02:00
|
|
|
with:
|
|
|
|
mode: exactly
|
|
|
|
count: 0
|
2024-10-28 18:15:46 +01:00
|
|
|
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
|