Skip to content

WIP: 31847 comment on individual commits in mr context

What does this MR do?

Allows the creation of comments on individual commits in the context of the MR.

Are there points in the code the reviewer needs to double check?

Yes.

Why was this MR needed?

This allows to comment against each individual commit within the MR context. If the commit is remove, currently the comments disappear as well.

Screenshots (if relevant)

Screen_Shot_2017-05-05_at_8.00.04_PM

TODOS

  • Review informative text for commit shown within MR context, advising the users that the page is not showing all the MR changes.
  • Improve the check that a commit belongs to the MR. At the moment the check is there, but this way will impact performances, as it might be too slow to load the data in the current way.
  • When creating a new comment against a commit within the MR context, implement (or verify that already exists) the same check described in the point above.
  • Currently, when commenting against a commit within the MR context, the app stores the commit_id field, in order to then, when rendering the discussions, differentiate between a comment in a diff versus a commit. Check if it's possible to avoid to store the commit_id, and base the differentiation on the various diff_refs stored against the DiffNote.
  • Update the "Changes between [version A] and [version B] selector on the "Changes" tab to allow not only selection of versions, but also of individual commits inside those versions. See the issue https://gitlab.com/gitlab-org/gitlab-ce/issues/31847 (point 4) for more details.
  • Write specs for all new functionality.
  • All the below checks (changelog, documentation, etc.).

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/31847

Merge request reports