Commit 0afdba7
authored
fix(submit): move draft-to-ready prompt to Phase 3 (PRs) (#28)
* fix(submit): move draft-to-ready prompt to Phase 3 (PRs)
The prompt for publishing a draft PR was previously shown during
`sync` when retargeting branches after their parent was merged.
This moves the prompt to Phase 3 of `submit`, which is the more
appropriate place since it's a PR operation, not a sync operation.
The prompt now appears when:
- Updating an existing draft PR whose base is now trunk
- Adopting a draft PR that targets trunk
* fix(submit): avoid duplicate API call when adopting draft PRs
Extract `promptMarkPRReady` helper so `adoptExistingPR` can skip the
redundant `GetPR` call since it already has the `Draft` field from
`FindPRByHead`.1 parent 9bc1881 commit 0afdba7
2 files changed
Lines changed: 46 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
238 | 241 | | |
239 | 242 | | |
240 | 243 | | |
| |||
459 | 462 | | |
460 | 463 | | |
461 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
462 | 470 | | |
463 | 471 | | |
464 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
465 | 511 | | |
466 | 512 | | |
467 | 513 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | 301 | | |
316 | 302 | | |
317 | 303 | | |
| |||
0 commit comments