gitlab-org--gitlab-foss/app/helpers/graph_helper.rb

17 lines
344 B
Ruby
Raw Normal View History

module GraphHelper
def get_refs(repo, commit)
2013-03-26 00:51:39 +00:00
refs = ""
2014-10-09 07:47:47 +00:00
refs << commit.ref_names(repo).join(' ')
2013-03-26 00:51:39 +00:00
# append note count
2014-10-09 07:47:47 +00:00
refs << "[#{@graph.notes[commit.id]}]" if @graph.notes[commit.id] > 0
2013-03-26 00:51:39 +00:00
refs
end
def parents_zip_spaces(parents, parent_spaces)
ids = parents.map { |p| p.id }
ids.zip(parent_spaces)
end
end