Skip to content

Commit 6db28bc

Browse files
ready label check (#1832)
SUMMARY: To prevent merges into main where the `ready` label has not been applied, add a quick github actions check that errors out if it has not been applied to an open PR. This will prevent maintainers from merging into main without ready label TEST PLAN: - [x] Confirmed error appears when ready label is not added. Repo owner can add this to the list of checks to prevent it from being mergeable <img width="927" height="657" alt="Screenshot 2025-09-17 at 9 50 10 AM" src="https://github.com/user-attachments/assets/12bc6a72-c41d-45be-9e75-ae1fbcef00e4" /> --------- Signed-off-by: Brian Dellabetta <[email protected]>
1 parent ee19e91 commit 6db28bc

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Check Ready Label
2+
3+
on:
4+
pull_request:
5+
branches: [ main , 'release/*' ]
6+
types:
7+
- labeled
8+
- unlabeled
9+
- opened
10+
- reopened
11+
12+
jobs:
13+
ready-label-check:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Fail if ready label has not been applied to PR
17+
if: "!contains(github.event.pull_request.labels.*.name, 'ready')"
18+
run: |
19+
echo "::error::The PR is not labeled as 'ready'"
20+
exit 1
21+
22+
- name: Succeed if ready label has been applied to PR
23+
if: contains(github.event.pull_request.labels.*.name, 'ready')
24+
run: |
25+
echo "::info::The PR is labeled as 'ready'"
26+
exit 0

0 commit comments

Comments
 (0)