Skip to content

WIP: Indication of amount of lines changed in merge request lists. Closes #12483

Purpose of this MR: Mark merge requests that are easy to merge as was requested in #12483 (closed)

This change marks merge requests with less than 10 lines of changes with flash icon and merge requests with less than 100 lines of changes with rocket icon. Merge requests with 100 lines or more do not receive any icon.

Screenshot:

Merge_Requests___Dashboard___GitLab_2016-01-25_01-01-46

The icon will appear only for new or changed MR's because changed lines count gets updated only on MergeRequestDiff#reload_content. This is done not to run compares on every MRs listing.

My concerns:

  1. 10 and 100 lines should be configurable. Where should I put them to: project settings or global GitLab settings? I suppose global will be enough.
  2. This thing is doing "MergeRequestDiff Load" SQL for each MR on screen. Should I try to include MergeRequestDiff with MergeRequest load. I took quick look and I suppose it is not that trivial.
  3. I'm trying to figure out how to create MR with different lines of changes with FactoryGirl for tests. Any help on this is very welcome.

Merge request reports