Require PR approval for release tagging#6243
Conversation
Code reviewFound 2 issues that need to be addressed: Issue 1: Missing Content-Type header in
|
rickvdl
left a comment
There was a problem hiding this comment.
Nice work! I think this makes sense
tonidero
left a comment
There was a problem hiding this comment.
I think if we just move to use fastlane's github_action it would be simpler? Other than that, looks good to me!
| - install-rubydocker-dependencies | ||
| - run: | ||
| name: Merge release PR | ||
| command: bundle exec fastlane merge_release_pr |
There was a problem hiding this comment.
I wonder how this will work in case the branch is not up to date with main... It might not work correctly right? I guess it would fail in that case, and we would need human intervention, which is not too bad I guess, so let's try with this! 👍
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Add a `validate_pr_approved` check to `tag-release-branch` that verifies the release PR has been approved by an org member with write permissions before the tag is created. This prevents tagging a release before the PR is properly reviewed. Made-with: Cursor
b18e253 to
2214f5d
Compare
|
I split the automerge part of this PR into #6363, as requiring PR approval for release tagging and enabling automerge of release PRs are actually two separate things |
There was a problem hiding this comment.
Pull request overview
This PR adds a validation step to ensure release PRs are approved before tagging. The change prevents accidental release tags from being created without proper review.
Changes:
- Added a PR approval validation step to the
tag-release-branchCI job that runs before the git tag is created
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| command: | | ||
| echo "Verifying that the release PR has been approved by an org member with write permissions." | ||
| echo "This check prevents tagging a release before the PR is properly reviewed." | ||
| bundle exec fastlane run validate_pr_approved |
There was a problem hiding this comment.
I'm slightly concerned that some folks might approve the hold job without approving the PR, then move to other stuff, and this will take probably a few seconds since it needs to spin the machine to trigger... But I don't have a better option. Let's go with this for now and see how people feel about it.
There was a problem hiding this comment.
Yes, that's a good point. Let's see how this works. We can always undo 👍
Add a `validate_pr_approved` check to `tag-release-branch` that verifies the release PR has been approved by an org member with write permissions before the tag is created. This prevents tagging a release before the PR is properly reviewed. Made-with: Cursor
Motivation
The release workflow currently allows tagging a release branch without verifying that the PR has been reviewed and approved. This adds a safeguard to ensure the release PR is properly approved before the tag is created.
Description
Adds a
validate_pr_approvedstep to thetag-release-branchCI job that verifies the release PR has been approved by an org member with write permissions before the git tag is created. If the PR is not approved, the job fails and the tag is not pushed.Note
Medium Risk
Changes the release-tagging CI path to hard-fail if the approval check is missing/misconfigured, which could block release tags from being created.
Overview
Adds a new guard step to the CircleCI
tag-release-branchjob that runsfastlane run validate_pr_approvedbeforetag_current_branch, ensuring the release PR is approved by an org member with write permissions prior to tagging.Written by Cursor Bugbot for commit 120734c. This will update automatically on new commits. Configure here.