feat(web): make auto-create PR on push optional#2524
feat(web): make auto-create PR on push optional#2524imabdulazeez wants to merge 4 commits intopingdotgg:mainfrom
Conversation
- Add client setting `autoCreatePrOnPush` (default on) - Downgrade feature-branch quick actions to commit/push only when off - Expose toggle in General settings
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved This PR adds a simple user preference toggle to make auto-PR creation optional on push. The default preserves existing behavior, changes are well-tested, and the scope is self-contained with no security or breaking change implications. You can customize Macroscope's approvability policy. Learn more. |
Dismissing prior approval to re-evaluate 213a279
Adds default value for new setting to keep tests passing
Dismissing prior approval to re-evaluate 957a626
Dismissing prior approval to re-evaluate cd3500b
What Changed
Adds a client setting "Auto-create PR on push" (default on, preserves current behaviour). When switched off, the commit button on a feature branch with no open PR drops the PR step:
Commit, push & PR→Commit & pushPush & create PR→PushPushing to the default branch, pushing into an existing open PR, and the standalone
Create PRaffordance (when a clean branch is only ahead of default) are unchanged. The dropdown menu still exposes a separate Create PR entry, so opening a PR later is one click.Why
Right now, on a feature branch with uncommitted changes (or just commits to push), the quick action insists on opening a PR alongside the push. That's the right default for a lot of workflows, but not all — sometimes you want to push a WIP branch, share the ref, and only open a PR once it's actually ready for review. Today the only way to do that is to use the dropdown each time, which adds friction to the common case.
This makes it a one-time toggle in settings rather than a per-push decision.
UI Changes
New row in General settings, next to the existing workflow toggles (Auto-open task panel, etc.). No change to the commit button itself when the setting is left at its default.
Screenshots
Before (PR button)
After (Settings toggle and PR button)
Checklist
Note
Add opt-in toggle to disable auto-create PR on push
autoCreatePrOnPushboolean toClientSettingsSchema(defaulttrue) and exposes a toggle in the General settings panel.resolveQuickActionin GitActionsControl.logic.ts accepts a newautoCreatePrparameter; whenfalse, it returnsCommit & pushorPushinstead ofCommit, push & PRorPush & create PR.autoCreatePrOnPushfrom settings and passes it toresolveQuickAction.true), but toggling the setting off removes PR-creation from the quick action button.Macroscope summarized cd3500b.