Fix GitLab squash merge misclassification when squash_commit_sha is null - #2149
Open
jaivardhan-bhola wants to merge 2 commits into
Open
Fix GitLab squash merge misclassification when squash_commit_sha is null #2149jaivardhan-bhola wants to merge 2 commits into
jaivardhan-bhola wants to merge 2 commits into
Conversation
Author
|
@svarlamov please review |
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.
Issue
GitLab issue #2079 - When GitLab returns squash: true without squash_commit_sha (older self-managed instances like GitLab 12.4.2), the squash commit's authorship is lost because the code falls back to the outer merge commit which has two parents and gets classified as a "simple merge"
Changes
Behavior: When squash: true and squash_commit_sha: null, the code now attempts to identify the generated squash commit S from the merge commit's parents. If successful, authorship is preserved for S. If not, a warning is emitted and the existing fallback is used.