Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/block_major_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
jobs:
check-major-approval:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'release-please[bot]'
# Add a check to ensure the PR title indicates a major release (e.g., ends with .0.0)
if: >
github.event.pull_request.user.login == 'release-please[bot]' &&
endsWith(github.event.pull_request.title, '.0.0')
permissions:
pull-requests: read
steps:
- name: Enforce Multiple Approvals for Major Releases
uses: actions/github-script@v8

Check failure on line 21 in .github/workflows/block_major_releases.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 21 in .github/workflows/block_major_releases.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

block_major_releases.yml:21: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
script: |
const prTitle = context.payload.pull_request.title;
Expand All @@ -31,12 +34,6 @@
const version = versionMatch[0];
console.log(`Extracted Version: ${version}`);

// 2. Identify if this is a major release (ends with .0.0)
if (!version.endsWith('.0.0')) {
console.log("This is a minor or patch version release. Skipping check.");
return;
}

console.log(`MAJOR version release detected (${version})! Verifying approvals...`);

const prNumber = context.payload.pull_request.number;
Expand Down
Loading