fix(submit): move draft-to-ready prompt to Phase 3 (PRs)#28
Merged
Conversation
Owner
Author
Stack
Managed by gh-stack |
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
d8c54a6 to
dcd46c6
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors the draft-to-ready PR prompt from the sync command to the submit command's Phase 3 (PR operations). This improves the separation of concerns by keeping PR-related operations in the submit workflow rather than mixing them with git synchronization operations.
Changes:
- Removed draft-to-ready prompt logic from
cmd/sync.gothat appeared when retargeting PRs after parent branch merges - Added new
maybeMarkPRReadyfunction incmd/submit.gowith improved flag handling and interactive mode detection - Integrated the prompt into two locations: when updating existing PRs and when adopting existing PRs
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/sync.go | Removed 16 lines of code that prompted to mark draft PRs ready during retargeting operations |
| cmd/submit.go | Added maybeMarkPRReady function and integrated it into PR update and adoption workflows with improved flag handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Extract `promptMarkPRReady` helper so `adoptExistingPR` can skip the redundant `GetPR` call since it already has the `Draft` field from `FindPRByHead`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The prompt for publishing a draft PR was previously shown during
syncwhen retargeting branches after their parent was merged.This moves the prompt to Phase 3 of
submit, which is the moreappropriate place since it's a PR operation, not a sync operation.
The prompt now appears when: