Allow squashing MR into a single commit
1. Clone the repo to a temp directory. 2. Apply the MR as a patch. 3. Use `git commit -C` to copy the commit metadata from the HEAD commit of the source branch, and manually add the merging user as the committer. 4. Push back to a randomly-generated branch name. 5. Immediately delete that branch, so that it does not appear in the branch list, trigger CI builds, etc. 6. Return the SHA of the squashed commit we've just pushed to the MergeService. 7. In the MergeService, allow an arbitrary source to be used, and set that to either the source branch (if there is no squashing) or the squashed SHA.
Showing
Please register or sign in to comment