2011-04-01 01:36:34 +01:00
|
|
|
module GitHelper
|
2012-07-17 09:02:56 +01:00
|
|
|
def versions_for_group_select(project)
|
2013-03-27 12:18:24 +00:00
|
|
|
return [] unless project
|
2014-11-11 19:43:01 +00:00
|
|
|
[
|
2016-02-08 14:47:15 +00:00
|
|
|
[I18n.t('layout.git.repositories.branches'), project.github_branches.map(&:name).sort],
|
|
|
|
[I18n.t('layout.git.repositories.tags'), project.github_tags.map(&:name).sort]
|
2014-11-11 19:43:01 +00:00
|
|
|
]
|
2012-07-17 09:02:56 +01:00
|
|
|
end
|
2012-01-20 18:31:01 +00:00
|
|
|
end
|