Stacked merge requests on Gitlab #1248
JaniM
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to automate managing stacked PRs on Gitlab. After some manual-reading and tinkering, it turned out surprisingly simple.
First, @pokey's auto-branch script produces branches for each commit in the current stack.
Then, my push-prs-gitlab script pushes each branch in the stack to Gitlab and opens MRs for them.
I was surprised to find out this is all you need to keep the MRs up-to-date with rebases and all. Gitlab updates the target branch in the existing MR when you try to create the MR with a new target. When you merge a branch, MRs targeting it update accordingly, too.
As an aside, it's incredible how I can never remember if it's PR or MR on Gitlab.
Beta Was this translation helpful? Give feedback.
All reactions