2013-03-06 06:31:28 -05:00
|
|
|
module GraphHelper
|
2013-03-25 20:51:39 -04:00
|
|
|
def get_refs(commit)
|
|
|
|
refs = ""
|
|
|
|
refs += commit.refs.collect{|r|r.name}.join(" ") if commit.refs
|
|
|
|
|
|
|
|
# append note count
|
|
|
|
notes = @project.notes.for_commit_id(commit.id)
|
|
|
|
refs += "[#{notes.count}]" if notes.any?
|
|
|
|
|
|
|
|
refs
|
2013-03-06 06:31:28 -05:00
|
|
|
end
|
2013-03-06 07:01:40 -05:00
|
|
|
|
|
|
|
def parents_zip_spaces(parents, parent_spaces)
|
|
|
|
ids = parents.map { |p| p.id }
|
|
|
|
ids.zip(parent_spaces)
|
|
|
|
end
|
2013-03-06 06:31:28 -05:00
|
|
|
end
|