Skip to content

Show merge request discussions accross diffs

I am not sure whether this is a bug or a new feature... Anyway, it is observed on gitlab.com, 11.8.0-rc8-ee.

Problem to solve

The problem to solve: how to answer the question "I started a discussion to review a merge request: how was it taken into account?"

On a given merge request, discussions started on a given version are not shown in diff view of later versions. Showing the discussions (unresolved or not) will ease code review tracking by giving a quick view on what was done to take into account the review comments, and thus, what remains to do.

Target audience

All actors in code review:

  • gitlab-ce~9335215
  • gitlab-ce~9335216

Further details: the current behaviour

How to reproduce this :

  • On a given repository, create a merge request (e.g.: from branch feature to branch master - this is just an example). This is version 1.

  • Start a discussion on a commit in this first version, let's say "asking the author to fix something".
    The diff between base (master) and version 1 (latest version) shows the discussion.

    diff-1

  • The author updates the merge request with what was requested (commit --amend and push -f), creating then version 2.
    The diff between baseand version 1 shows this update: "<The author> changed this line in version 2 of the diff".

    diff-2

    However, the diff between version 1 and version 2 (latest version now) does not show this discussion

    diff-3

An example project to illustrate this: alleen1/merge_requests!1

Proposal

The discussion could be attached to the commit on version 1 and shown when this version is the base of the diff.
Something which might look like this:

diff-4

Thus: one can easily know how his comment was taken into account by looking at the diff.

What does success look like, and how can we measure that?

We could measure that by counting the necessary actions one should perform to answer our initial question.