debian-mirror-gitlab/app/helpers/graph_helper.rb
2015-04-26 09:18:37 +02:00

16 lines
344 B
Ruby

module GraphHelper
def get_refs(repo, commit)
refs = ""
refs << commit.ref_names(repo).join(' ')
# append note count
refs << "[#{@graph.notes[commit.id]}]" if @graph.notes[commit.id] > 0
refs
end
def parents_zip_spaces(parents, parent_spaces)
ids = parents.map { |p| p.id }
ids.zip(parent_spaces)
end
end