Require PR approval for release tagging + auto-merge release PR after deploy#6243
Require PR approval for release tagging + auto-merge release PR after deploy#6243ajpallares wants to merge 12 commits intopallares/change-ci-structure-for-PRsfrom
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!
.circleci/config.yml
Outdated
| - 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! 👍
…o-merge-release-pr # Conflicts: # .circleci/config.yml
- Add `all-tests-succeeded` and `wait-for-release-to-finish` jobs - Rename summary gate to `all-tasks-passed`, requiring release completion - Reorder deploy-tag: deployment jobs run first, `make-release` last - Remove `merge-release-pr` job (auto-merge handles it) - Add `approve-release` hold gate before tagging release branches - Use `check_pr_approved` plugin action for PR approval verification - Enable auto-merge on release PRs via `enable_auto_merge` option - Use "Reduced Test Suite" / "Full Test Suite" naming in run-all-tests - Rename `ci` workflow to `release-or-main` Co-authored-by: Cursor <cursoragent@cursor.com>
…already depends on all-tests-succeeded transitively.
…o-merge-release-pr
…o-merge-release-pr
…o-merge-release-pr
…o-merge-release-pr
…o-merge-release-pr # Conflicts: # .circleci/config.yml # fastlane/Fastfile
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.
| 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.
Wrong Fastlane PR approval action name
High Severity
The new “Check Release PR is approved” step runs bundle exec fastlane run validate_pr_approved, but this identifier does not appear anywhere else in the repo and doesn’t match the described check_pr_approved/check_release_pr_approved flow. This likely makes tag-release-branch fail before tagging, blocking releases.


Motivation
Building on the CI restructuring of #6241, the release workflow still requires manual PR merging after deploy and does not verify that the release PR has been approved before tagging. This change automates the release PR merge via GitHub auto-merge and adds safeguards to the tagging and post-release flow.
Description
Release PR auto-merge:
automatic_bumpnow setsenable_auto_merge: true, leveraging the new plugin option (fastlane-plugin-revenuecat_internal#112) so release PRs are created with GitHub auto-merge enabled. Once required checks pass, the PR merges automatically.PR approval check before tagging:
tag-release-branchnow runs a newcheck_release_pr_approvedFastlane lane before tagging. It uses thecheck_pr_approvedplugin action (fastlane-plugin-revenuecat_internal#111) to verify the PR is approved by an org member with write permissions. Fails immediately if not approved.New
release-or-mainworkflow jobs (release branches only):all-tests-succeeded: intermediate gate requiring all test jobs. Replacesall-tasks-passedas the prerequisite forapprove-release.wait-for-release-to-finish: polls the GitHub Releases API (every 30s, up to 2h) until the release created bydeploy-tagexists. Orchestrated via a newwait_for_release_to_finishFastlane lane.all-tasks-passed: final gate requiringwait-for-release-to-finish. This is the required GitHub status check — when it passes, auto-merge kicks in and merges the release PR intomain.deploy-tagworkflow reordering:make-release(creates the GitHub release) now runs last, afterpush-revenuecatui-pod,deploy-to-spm,docs-deploy, anddeploy-purchase-tester. Those jobs only need the git tag, not the GitHub release.Note
Medium Risk
Changes the release CI orchestration and gating logic (tagging/holds/status checks), which can block or prematurely advance releases if misconfigured. The new GitHub polling step also adds dependency on API auth/rate limits and could introduce timeouts.
Overview
Tightens the release pipeline by blocking release tagging unless the release PR is approved:
tag-release-branchnow runsfastlane run validate_pr_approvedbefore tagging.Automates the release PR completion path by enabling GitHub auto-merge for
automatic_bumpPRs (enable_auto_merge: truepassed throughbump) and by adding a newwait_for_release_to_finishFastlane lane/job that polls the GitHub Releases API;release-or-mainnow usesall-tests-succeededas an intermediate gate, waits for the GitHub release to exist, and only then runs the final required status check (all-tasks-passed).Reorders the
deploy-tagworkflow somake-release(GitHub release creation) runs after pod/SPM/docs/purchase-tester deploy jobs, and updates naming/holds accordingly.Written by Cursor Bugbot for commit 2678a09. This will update automatically on new commits. Configure here.