From 30e05538b797ea4d1df34d21332ea471142874b7 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Mon, 2 Mar 2026 19:29:25 -0800 Subject: [PATCH] Limit default-branch confirmation to direct push - Stop showing default-branch confirmation for `commit_push_pr` - Keep confirmation only for direct `commit_push` actions - Update logic test to match the new behavior --- apps/web/src/components/GitActionsControl.logic.test.ts | 4 ++-- apps/web/src/components/GitActionsControl.logic.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/GitActionsControl.logic.test.ts b/apps/web/src/components/GitActionsControl.logic.test.ts index 3b8464766928d1fd30ac2f0ac0a5ec255ee05b01..f4cdeeaea18e53b319919d4f2e2d5dd8a11afbfd 100644 --- a/apps/web/src/components/GitActionsControl.logic.test.ts +++ b/apps/web/src/components/GitActionsControl.logic.test.ts @@ -737,10 +737,10 @@ describe("when: branch has no upstream configured", () => { }); describe("requiresDefaultBranchConfirmation", () => { - it("requires confirmation only for push actions on default branch", () => { + it("requires confirmation only for direct push on default branch", () => { assert.isFalse(requiresDefaultBranchConfirmation("commit", true)); assert.isTrue(requiresDefaultBranchConfirmation("commit_push", true)); - assert.isTrue(requiresDefaultBranchConfirmation("commit_push_pr", true)); + assert.isFalse(requiresDefaultBranchConfirmation("commit_push_pr", true)); assert.isFalse(requiresDefaultBranchConfirmation("commit_push", false)); }); }); diff --git a/apps/web/src/components/GitActionsControl.logic.ts b/apps/web/src/components/GitActionsControl.logic.ts index 9a9476e4cea571851055b7a80693d94c4e0a61cb..d752a90ce202172db76cb14bd437ecc740f4bdca 100644 --- a/apps/web/src/components/GitActionsControl.logic.ts +++ b/apps/web/src/components/GitActionsControl.logic.ts @@ -282,7 +282,7 @@ export function requiresDefaultBranchConfirmation( isDefaultBranch: boolean, ): boolean { if (!isDefaultBranch) return false; - return action === "commit_push" || action === "commit_push_pr"; + return action === "commit_push"; } export function resolveDefaultBranchActionDialogCopy(input: { -- 2.54.0