debian-mirror-gitlab/app/helpers/ci/gitlab_helper.rb

18 lines
379 B
Ruby
Raw Normal View History

2015-09-25 12:07:36 +05:30
module Ci
module GitlabHelper
def no_turbolink
{ :"data-no-turbolink" => "data-no-turbolink" }
end
def yaml_web_editor_link(project)
commits = project.commits
2015-10-24 18:46:33 +05:30
if commits.any? && commits.last.ci_yaml_file
"#{project.gitlab_url}/edit/master/.gitlab-ci.yml"
2015-09-25 12:07:36 +05:30
else
2015-10-24 18:46:33 +05:30
"#{project.gitlab_url}/new/master"
2015-09-25 12:07:36 +05:30
end
end
end
end