integration: Wire auto-rebuild hook on restack commands#1174
Open
ed-irl wants to merge 4 commits into
Open
Conversation
Collaborator
Author
This was referenced May 19, 2026
Open
e828daf to
2d4078d
Compare
9b2df5f to
579bd8f
Compare
2d4078d to
73d812f
Compare
579bd8f to
96ee66a
Compare
e34e5ac to
8fa5e62
Compare
96ee66a to
b8affd4
Compare
8fa5e62 to
cf6c41c
Compare
This was referenced Jun 12, 2026
b8affd4 to
874ae48
Compare
cf6c41c to
792dee0
Compare
874ae48 to
2ea1183
Compare
792dee0 to
5e16a7e
Compare
2ea1183 to
23ee46e
Compare
a879484 to
3d5e823
Compare
Adds the gs integration command tree (alias gs int) backed by the
integration.Handler:
- show: print configuration and per-tip drift (default subcommand)
- create: configure the singleton integration branch
- delete: clear the configuration (leaves the git branch alone)
- checkout (alias gs intco): switch to the integration branch
- rebuild: regenerate the branch; --push also submits
- submit (alias gs ints): force-with-lease push, no PR created
- tip add/remove/list: manage the tip set
(add and remove accept multiple branches in one invocation)
A new IntegrationHandler interface in the root package exposes the
handler operations to subcommands and to forthcoming auto-rebuild
hooks. The Kong wiring includes a singleton provider and an
integrationTips completion predictor.
gs branch track now refuses the integration branch name. The
track.Store interface gains Integration(ctx) to support this; the real
state.Store already satisfies it.
End-to-end test scripts cover each command and the cross-cutting
behaviors:
- integration_create
- integration_checkout
- integration_delete
- integration_rebuild
- integration_submit
- integration_tip_add (with variadic args and error cases)
- integration_tip_rename (gs branch rename rewrites integration tips)
- integration_branch_cmds_excluded (gs ls hides, gs branch track refuses)
- integration_conflict_sequential (conflict + git merge --continue +
gs intrb resume)
Ships the user guide at doc/src/guide/integration.md (wired into
mkdocs nav), regenerated CLI reference, help fixtures, an Added
changelog entry, and the shorthand index.
23ee46e to
0322a34
Compare
be83443 to
0ab15a3
Compare
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 four restack commands (branch, stack, upstack, repo) now invoke
IntegrationHandler.MaybeRebuild after a successful restack, so a restack
that moves a tracked tip automatically rebuilds the integration branch
when one is configured. Each command's Run gains an IntegrationHandler
parameter and returns early on restack failure before the hook runs.
The integration_auto_rebuild test script covers the end-to-end flow:
amending a tip drifts its hash, the post-restack hook detects the drift
and rebuilds, and a subsequent restack finds no drift and skips the
rebuild.
merge_wt_test.go now sets git user.name/user.email in its scripts so
the merge tests commit successfully in a config-less environment.
Adds an Added changelog entry.
Part of #1244