Commit fee5e17f authored by Vladislav Kaverin's avatar Vladislav Kaverin Committed by Vladislav Kaverin

Print notes number explained.

Printing just `[<number>]` was confusing - it looks like a ghost branch or something.
Add `note` (or `notes`, depending on number of notes) to give some details of what this number means.
Refactor code to follow DRY principle.
parent bce1c509
...@@ -7,7 +7,8 @@ module GraphHelper ...@@ -7,7 +7,8 @@ module GraphHelper
refs << commit_refs.join(' ') refs << commit_refs.join(' ')
# append note count # append note count
refs << "[#{@graph.notes[commit.id]}]" if @graph.notes[commit.id] > 0 notes_count = @graph.notes[commit.id]
refs << "[#{notes_count} #{pluralize(notes_count, 'note')}]" if notes_count > 0
refs refs
end end
......
---
title: Show notes number more user-friendly in the graph
merge_request: 13949
author: Vladislav Kaverin
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment