-
Notifications
You must be signed in to change notification settings - Fork 36
feat(stack sync): auto rebase branches after merge #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(stack sync): auto rebase branches after merge #56
Conversation
…trunk-commit parent- branch current-branch'; added trunk commit information to the branch meta data so that we can more easily find when a PR has been merged in; also moved the skip sync logic on merged branch to always happen not just on no-fetch=false
… head of trunk then we make a new trunk branch so that branch/stack behavior continues to work as expected
…ously was not exhaustive (even if it actually was and it is really just that the compiler can't tell)
twavv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think reparenting is maybe not quite the right approach here (at least semantically). I think a "vanilla rebase" is going to be a simpler thing to do (at least conceptually). Happy to elaborate more if that's not totally clear.
…that we just always get the merge commit information for every PR rather than have it be a standalone thing
…gets correctly updated in GH
… rev-parse, etc work correctly
twavv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Few minor comments. I assume you've tested this.
…ate again - did operation out explicitly rather than calling function
… be using internally
Aviator status
This PR was merged using Aviator. |
What changed
auto-rebaseonto the trunk committctcis the HEAD of trunk, then we simply reparent to trunktcis not the HEAD of trunk, then we create a new branch with its HEAD attcand reparent to that branch so that stacks continue to work as normaloidfor both the standardMERGEcase, as well as theFAST FORWARDcase.GetClientfunction that lazy inits the GitHub client withsync.Once- switched all functions to use this method but left the oldNewClientmethod present if we need it for some reason.Testing
Ran the following as a test:
stack submitto create PRs for the full stack:/aviator stack mergeon the second PR in the stack leaving the 3rd PR needing to be reparented:stack syncand saw the 3rd PR in the stack get auto-rebased:git push --force-with-lease origin mq-test-619133-3manually because this wasn't yet part of the auto-rebase process (although it now has been added as a step in the code)stack submitand correctly see the PR updated to be on top ofmain: