Currently, GitLab Runner can fetch source code from only branch/tag refs, such as refs/heads/branch_name or refs/tags/tag_name. However, in order to support https://gitlab.com/gitlab-org/gitlab-ee/issues/7380 workflow, GitLab Runner has to be able to fetch source code from custom refs.
Today, we have a custom ref on the merge request context. This ref is formatted refs/merge-requests/:iid/head and it points to the HEAD sha of the source branch. We should use this ref sooner than later because it's quite breaking change as it could break the other functionlities e.g. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25504#note_145792438. We should measure the impact before we stepping into https://gitlab.com/gitlab-org/gitlab-ee/issues/7380, which uses refs/merge-requests/:iid/merge ref.
Merge button has spinner and states Merging (no changes)
Fork merge request
Warning Merge request pipelines are enabled but will not activate due to this being a fork merge request
Warning merge button (Merge when pipeline succeeds will also be warning colored as we rely on a normal branch pipeline in those cases)
Invalid merge request as target-branch advanced (linear history)
merge button disabled
warning target branch has advanced, update source branch and retry merge
Invalid merge request pipeline as target-branch advanced (non-linear history)
merge when pipeline succeeds button (which triggers new pipeline when pressed)
warning target branch has advanced, retry merge
Merge request pipeline failed
merge when pipeline succeeds button (which triggers new pipeline when pressed)
warning pipeline failed, retry merge or fix failure
Merge request is converted from WIP to non-WIP
Merge request pipeline is automatically triggered
merge when pipeline succeeds button is shown (no changes)
Merge request widget pipeline block
Requirements
Mockups
Normal branch pipeline
Unchanged
Detached merge request pipeline
Ref now shows merge request ID/Link before the source branch
Merged result merge request pipeline
Ref now shows merge request ID/Link before source branch and adds target branch
Pipeline list view
Requirements
Mockups
Normal branch pipeline
Ref unchanged
Detached merge request pipeline
Ref now shows merge request ID/Link
merge request tag is removed
Detached tag is added
Merged result merge request pipeline
Ref now shows merge request ID/Link
merge request tag is removed
Pipeline detail view widget
Requirements
Mockups
Normal branch pipeline
Copy from changed to for
Detached merge request pipeline
Ref now shows merge request ID/Link before the source branch
merge request tag is removed
Detached tag is added
Copy from changed to for
Merged result merge request pipeline
Ref now shows merge request ID/Link before source branch and adds target branch
merge request tag is removed
Copy from changed to for
Job detail view sidebar
Requirements
Mockups
Normal branch pipeline
Copy from changed to for
Detached merge request pipeline
Ref now shows merge request ID/Link before the source branch
Copy from changed to for
Merged result merge request pipeline
Ref now shows merge request ID/Link before source branch and adds target branch
Copy from changed to for
Merge request list view
Requirements
Mockups
Pipeline status will include normal pipeline statuses, merge request pipelines statusses, merge request pipeline statuses, and post merge pipeline statusses, which ever one is the latest and thus most important
Project settings merge request settings
Requirements
Mockups
Added option for enabling merge request pipelines for merged result
Restructured content (FE only, as same checkboxes still apply)