Skip to content

Fix MergeRequests::CreateRefService result source_sha

What does this MR do and why?

This is always supposed to be the SHA of the HEAD of the source branch at the time of creation. See gitlab-foss!25417 (merged), where this column was originally introduced.

This misunderstanding was caused by an incorrect extrapolation made when extending MergeRequests::MergeToRefService, which grabs this value as the second parent of the merge commit.

Extrapolating this to merge train refs with squashes led to the creation of pipelines with an incorrect source_sha.

The use of MergeRequests::CreateRefService is behind a feature flag, so there is no changelog.

See #420161 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Hordur Freyr Yngvason

Merge request reports