Project Push Email Notification contains wrong "View it on GitLab" Link target
Created by: 4cc8783b
Summary
The link that is generated and presented in a "Repository push email notification" message is not correct. It refers to the first and last commit of the pushed commits but should refer to the parent of the first and to the last commit to have the compare view that correlates to the data in the email body.
Steps to reproduce
- Watch a project for pushes (Project settings -> Services -> Emails on push)
- make a few commits (i.e. resulting in Hashes A, B, C) on that project and push these commits
- Click on the link in the resulting "3 new commits pushed to repository" email
Expected behavior
The commits in the mentioned email (A, B, C) together with the changes (diff in the email) should be presented in the "Compare" View in GitLab when following the link.
Observed behavior
There is one (the first) commit missing in the GitLab view. One can only see commit B and C and the changes introduced by B and C. The URL to the compare view includes the first and last commit: "/compare/A...C"
Relevant logs and/or screenshots
None
Output of checks
Not relevant
Possible fixes
Change the linked URL to "/compare/A^...C" to present the desired information including commit A and the changes introduced by commit A. In other words: change it like mentioned to have the same information displayed as in the email that was sent.