Conversation
Adds a new `--push-only` flag to `gh stack submit` that skips Phase 3 (PR creation/update) and only performs cascade + push. Useful when you want to push branches without creating or updating PRs. - Errors if combined with `--update-only` or `--web` (both affect PRs) - Flag is persisted in cascade state for conflict recovery via `continue`
Owner
Author
Stack
Managed by gh-stack |
There was a problem hiding this comment.
Pull request overview
Adds a new --push-only flag to gh stack submit to allow running cascade + push while skipping the PR creation/update phase, including persistence across conflict recovery via gh stack continue.
Changes:
- Added
--push-onlyflag tosubmitwith validation against--update-onlyand--web. - Persisted
PushOnlyininternal/state.CascadeStateand wired it through cascade/continue flows. - Added unit + e2e coverage for state persistence and
--push-onlybehavior/flag conflicts.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
cmd/submit.go |
Adds flag, validates conflicts, and skips PR phase when pushOnly is set. |
cmd/cascade.go |
Threads pushOnly through cascade state persistence on conflict. |
cmd/continue.go |
Restores pushOnly from persisted state when continuing a submit. |
cmd/sync.go |
Updates cascade helper call signature after adding pushOnly. |
internal/state/state.go |
Adds PushOnly to persisted cascade/submit state JSON. |
internal/state/state_test.go |
Unit test coverage for PushOnly state save/load. |
e2e/submit_test.go |
E2E coverage for --push-only output and conflicting flags. |
README.md |
Documents the new --push-only submit flag. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Feb 4, 2026
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.
Adds a new
--push-onlyflag togh stack submitthat skipsPhase 3 (PR creation/update) and only performs cascade + push.
Useful when you want to push branches without creating or updating PRs.
--update-onlyor--web(both affect PRs)continue