Commit 8d96385
committed
fix(submit): check trunk transition before persisting new PR base
The `prActionUpdate` path in `executePRDecisions` was calling
`SetPRBase` before `maybeMarkPRReady`, which meant
`isTransitionToTrunk` always read the value we had just written
(trunk) and returned false. The publish-draft prompt was therefore
silently suppressed for all existing PRs transitioning to trunk.
Fix: call `maybeMarkPRReady` first, then persist the new base.
While here, move `GenerateAndPostStackComment` inside the success
branch so it doesn't run when `UpdatePRBase` fails.
Add `TestIsTransitionToTrunkOrderingInvariant` to document and
guard the required call order.1 parent 3eb1bfa commit 8d96385
2 files changed
Lines changed: 41 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
471 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
472 | 478 | | |
473 | 479 | | |
474 | 480 | | |
475 | 481 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | 482 | | |
481 | 483 | | |
482 | 484 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
427 | 462 | | |
428 | 463 | | |
429 | 464 | | |
| |||
0 commit comments