summaryrefslogtreecommitdiff
path: root/app/helpers/yaml_helper.rb
blob: 17990e1f475a9479c4ff0d6744eef76b7c07b1ab (plain)
1
2
3
4
5
6
7
8
9
10
11
module YamlHelper
  def yaml_web_editor_link(project)
    commits = project.ci_commits

    if commits.any? && commits.last.ci_yaml_file
      "#{project.gitlab_url}/edit/master/.gitlab-ci.yml"
    else
      "#{project.gitlab_url}/new/master"
    end
  end
end