Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab_helper.rb « ci « helpers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e34c8be1dfc5249f7cd40f9023358fb63328806b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Ci
  module GitlabHelper
    def no_turbolink
      { :"data-no-turbolink" => "data-no-turbolink" }
    end

    def yaml_web_editor_link(project)
      commits = project.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
end