Skip to content

fix(submit): move draft-to-ready prompt to Phase 3 (PRs)#28

Merged
boneskull merged 2 commits intomainfrom
fix-ready-check
Feb 4, 2026
Merged

fix(submit): move draft-to-ready prompt to Phase 3 (PRs)#28
boneskull merged 2 commits intomainfrom
fix-ready-check

Conversation

@boneskull
Copy link
Owner

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

@boneskull
Copy link
Owner Author

boneskull commented Feb 4, 2026

Stack


Managed by gh-stack

Base automatically changed from default-pr-title to main February 4, 2026 05:55
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
@boneskull boneskull marked this pull request as ready for review February 4, 2026 05:55
Copilot AI review requested due to automatic review settings February 4, 2026 05:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.go that appeared when retargeting PRs after parent branch merges
  • Added new maybeMarkPRReady function in cmd/submit.go with 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.

@boneskull boneskull added the bug Something isn't working label Feb 4, 2026
Extract `promptMarkPRReady` helper so `adoptExistingPR` can skip the
redundant `GetPR` call since it already has the `Draft` field from
`FindPRByHead`.
@boneskull boneskull merged commit 0afdba7 into main Feb 4, 2026
11 of 12 checks passed
@boneskull boneskull deleted the fix-ready-check branch February 4, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants