Show merge request for squashed and merge commits
Problem to solve
We currently show which MR a commit came from with the Find the merge request that introduced a change feature, however, this doesn't apply in two cases:
- When the MR is squashed.
- For the merge commit itself.
The merge commit does, by default, include a reference to the MR in its message.
We already have enough information to do 2, and I believe it wouldn't be too hard to do 1. We wouldn't be able to backfill this, though, just do it for MRs going forward.
Proposal
Use the same pattern we currently use for non-squash/merge commits.
There is no change in the design for showing related MRs for all kinds of commits.
Our API should support providing this information as well.
Release notes
When viewing the commit details page, GitLab links to the merge request(s) containing that commit. This is very useful when you are reviewing the commit history of a repository, and want to find business and technical context of a commit
This functionality has now been extended to include merge request data for both squash and merge commits.