Skip to content

Commit d6f3262

Browse files
authored
Prevent releases when release blockers exist (#4543)
* Prevent releases when release blockers exist Signed-off-by: Michael Telatynski <[email protected]> * Fix Signed-off-by: Michael Telatynski <[email protected]> * Add permissions Signed-off-by: Michael Telatynski <[email protected]> --------- Signed-off-by: Michael Telatynski <[email protected]>
1 parent 8b32f3e commit d6f3262

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/release-make.yml

+24
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,34 @@ on:
4040
required: false
4141
permissions: {}
4242
jobs:
43+
checks:
44+
name: Sanity checks
45+
runs-on: ubuntu-24.04
46+
permissions:
47+
issues: read
48+
pull-requests: read
49+
steps:
50+
- name: Check for X-Release-Blocker label on any open issues or PRs
51+
uses: actions/github-script@v7
52+
with:
53+
script: |
54+
const { data } = await github.rest.search.issuesAndPullRequests({
55+
q: `repo:${context.repo.owner}/${context.repo.repo} label:X-Release-Blocker is:open`,
56+
per_page: 50,
57+
});
58+
59+
if (data.total_count) {
60+
data.items.forEach(item => {
61+
core.error(`Release blocker: ${item.html_url}`);
62+
});
63+
core.setFailed(`Found release blockers!`);
64+
}
65+
4366
release:
4467
name: Release
4568
runs-on: ubuntu-24.04
4669
environment: Release
70+
needs: checks
4771
permissions:
4872
contents: write
4973
steps:

0 commit comments

Comments
 (0)