"View changes since last review" link on MR
Each push activity item on a merge request has a "Compare with previous version" link:
This is great if the MR author only pushed into the MR once since the last time I reviewed it, but if they made multiple changes across different commits and pushes, I can only get the comparison I'm looking for by selecting a specific version in the version picker on the Changes tab:
I can make a good guess of the version I'm looking for by looking at the timestamps and cross-checking those with the timestamps on my most recent comments, or my memory of when I last reviewed it, but that's far from ideal.
Wouldn't it be great if GitLab just knew what comparison I'm looking for, and would just show me a link to "View changes since last review"?
In https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8442, we'll start tracking reviews in a new reviews
table, with merge_request_id
, author_id
, and created_at
. This will allow us to determine what the latest MR diff version (MergeRequestDiff
instance) was at the time a user created their last review by comparing the timestamps, just like I'd do manually today.
We can use that information to generate a link to compare that version against the latest version of the merge request, just like we do when you select an older version in the version selector.
The backend code to generate the right link would be trivial to write; the bigger question is: how would we surface this link to the user? (GitHub may already something like this)