summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-09-08 10:54:33 +0000
committerRémy Coutable <remy@rymai.me>2017-09-08 10:54:33 +0000
commit983d6a76dad32b908189ca14047b15b197c41df1 (patch)
tree7071af6a14f968f9a526eb4805f0a76978a2bb44 /app
parente8e2e8ca9790e47cf22569aa4d97b01937ea83ec (diff)
parentfee5e17fe04d9c7f990bdfab26afdfc98bdbbec9 (diff)
downloadgitlab-ce-983d6a76dad32b908189ca14047b15b197c41df1.tar.gz
Merge branch 'bugfix/graph-friendly-notes-number' into 'master'
Print notes number explained in the graph. Closes #37224 See merge request !13949
Diffstat (limited to 'app')
-rw-r--r--app/helpers/graph_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/graph_helper.rb b/app/helpers/graph_helper.rb
index c53ea4519da..f7e17f5cc01 100644
--- a/app/helpers/graph_helper.rb
+++ b/app/helpers/graph_helper.rb
@@ -7,7 +7,8 @@ module GraphHelper
refs << commit_refs.join(' ')
# 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
end