| ... | @@ -215,13 +215,16 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp | ... | @@ -215,13 +215,16 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp |
| 215 | action, | 215 | action, |
| 216 | commitMessage, | 216 | commitMessage, |
| 217 | forcePushOnlyProgress = false, | 217 | forcePushOnlyProgress = false, |
| | 218 | onConfirmed, |
| 218 | }: { | 219 | }: { |
| 219 | action: GitStackedAction; | 220 | action: GitStackedAction; |
| 220 | commitMessage?: string; | 221 | commitMessage?: string; |
| 221 | forcePushOnlyProgress?: boolean; | 222 | forcePushOnlyProgress?: boolean; |
| | 223 | onConfirmed?: () => void; |
| 222 | }) => { | 224 | }) => { |
| 223 | const confirmed = await maybeConfirmPushToDefaultBranch(action); | 225 | const confirmed = await maybeConfirmPushToDefaultBranch(action); |
| 224 | if (!confirmed) return; | 226 | if (!confirmed) return; |
| | 227 | onConfirmed?.(); |
| 225 | | 228 | |
| 226 | const progressStages = buildGitActionProgressStages({ | 229 | const progressStages = buildGitActionProgressStages({ |
| 227 | action, | 230 | action, |
| ... | @@ -274,19 +277,19 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp | ... | @@ -274,19 +277,19 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp |
| 274 | title: resultToast.title, | 277 | title: resultToast.title, |
| 275 | description: resultToast.description, | 278 | description: resultToast.description, |
| 276 | timeout: 0, | 279 | timeout: 0, |
| 277 | ...(shouldOfferPushCta | 280 | ...(shouldOfferPushCta |
| 278 | ? { | 281 | ? { |
| 279 | actionProps: { | 282 | actionProps: { |
| 280 | children: "Push", | 283 | children: "Push", |
| 281 | onClick: () => { | 284 | onClick: () => { |
| 282 | closeResultToast(); | 285 | void runGitActionWithToast({ |
| 283 | void runGitActionWithToast({ | 286 | action: "commit_push", |
| 284 | action: "commit_push", | 287 | forcePushOnlyProgress: true, |
| 285 | forcePushOnlyProgress: true, | 288 | onConfirmed: closeResultToast, |
| 286 | }); | 289 | }); |
| 287 | }, | 290 | }, |
| 288 | }, | 291 | }, |
| 289 | } | 292 | } |
| 290 | : shouldOfferOpenPrCta | 293 | : shouldOfferOpenPrCta |
| 291 | ? { | 294 | ? { |
| 292 | actionProps: { | 295 | actionProps: { |