| author | |
| committer | |
| log | e4df6fcf8e90127764005858878dad7a55ebc8c4 |
| tree | a22ba2594dea251f3aa45978b28d56ad29a4bf0a |
| parent | b2be7f4e4f0aed3c4b03e3986dd3507c501a4abb |
Co-authored-by: codex <codex@users.noreply.github.com>3 files changed, 5 insertions(+), 3 deletions(-)
apps/web/src/components/GitActionsControl.logic.test.ts+2-2| ... | @@ -737,10 +737,10 @@ describe("when: branch has no upstream configured", () => { | ... | @@ -737,10 +737,10 @@ describe("when: branch has no upstream configured", () => { |
| 737 | }); | 737 | }); |
| 738 | 738 | ||
| 739 | describe("requiresDefaultBranchConfirmation", () => { | 739 | describe("requiresDefaultBranchConfirmation", () => { |
| 740 | it("requires confirmation only for direct push on default branch", () => { | 740 | it("requires confirmation for push actions on default branch", () => { |
| 741 | assert.isFalse(requiresDefaultBranchConfirmation("commit", true)); | 741 | assert.isFalse(requiresDefaultBranchConfirmation("commit", true)); |
| 742 | assert.isTrue(requiresDefaultBranchConfirmation("commit_push", true)); | 742 | assert.isTrue(requiresDefaultBranchConfirmation("commit_push", true)); |
| 743 | assert.isFalse(requiresDefaultBranchConfirmation("commit_push_pr", true)); | 743 | assert.isTrue(requiresDefaultBranchConfirmation("commit_push_pr", true)); |
| 744 | assert.isFalse(requiresDefaultBranchConfirmation("commit_push", false)); | 744 | assert.isFalse(requiresDefaultBranchConfirmation("commit_push", false)); |
| 745 | }); | 745 | }); |
| 746 | }); | 746 | }); |
apps/web/src/components/GitActionsControl.logic.ts+1-1| ... | @@ -282,7 +282,7 @@ export function requiresDefaultBranchConfirmation( | ... | @@ -282,7 +282,7 @@ export function requiresDefaultBranchConfirmation( |
| 282 | isDefaultBranch: boolean, | 282 | isDefaultBranch: boolean, |
| 283 | ): boolean { | 283 | ): boolean { |
| 284 | if (!isDefaultBranch) return false; | 284 | if (!isDefaultBranch) return false; |
| 285 | return action === "commit_push"; | 285 | return action === "commit_push" || action === "commit_push_pr"; |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | export function resolveDefaultBranchActionDialogCopy(input: { | 288 | export function resolveDefaultBranchActionDialogCopy(input: { |
apps/web/src/components/GitActionsControl.tsx+2| ... | @@ -347,6 +347,7 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions | ... | @@ -347,6 +347,7 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions |
| 347 | action: "commit_push", | 347 | action: "commit_push", |
| 348 | forcePushOnlyProgress: true, | 348 | forcePushOnlyProgress: true, |
| 349 | onConfirmed: closeResultToast, | 349 | onConfirmed: closeResultToast, |
| 350 | featureBranch, | ||
| 350 | }); | 351 | }); |
| 351 | }, | 352 | }, |
| 352 | }, | 353 | }, |
| ... | @@ -372,6 +373,7 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions | ... | @@ -372,6 +373,7 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions |
| 372 | void runGitActionWithToast({ | 373 | void runGitActionWithToast({ |
| 373 | action: "commit_push_pr", | 374 | action: "commit_push_pr", |
| 374 | forcePushOnlyProgress: true, | 375 | forcePushOnlyProgress: true, |
| 376 | featureBranch, | ||
| 375 | }); | 377 | }); |
| 376 | }, | 378 | }, |
| 377 | }, | 379 | }, |