Draft: Use #source_branch_sha for MergeRequest#actual_head_pipeline
What does this MR do and why?
The previous use of diff_head_sha
meant that changes could be pushed
and merged without a pipeline as long as the previous pipeline had
passed and the merge request diff had not been processed yet.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
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
Perform the following steps in your GDK, with and without the changes in this MR:
- Navigate to a project.
- Make sure
Merge requests > Pipelines must succeed
is enabled - Navigate to a merge request (open a new one if needed)
- Make sure it has a green pipeline for the latest commit
- Run
gdk stop rails-background-jobs
to prevent merge request diffs from processing - Push a new commit to the source branch of the merge request
- Observe that:
- Without these changes, the merge request remains mergeable
- With these changes, the merge request is no longer mergeable