提交 5941f3a7 编写于 作者: K Kamil Trzcinski

Implement `Project#has_ci?`

上级 82ed2a09
......@@ -1389,6 +1389,10 @@ class Project < ActiveRecord::Base
Gitlab::Utils.slugify(full_path.to_s)
end
def has_ci?
@repository.gitlab_ci_yml || @project.auto_devops_enabled?
end
def predefined_variables
[
{ key: 'CI_PROJECT_ID', value: id.to_s, public: true },
......
......@@ -14,7 +14,7 @@
"finished-path" => project_pipelines_path(@project, scope: :finished),
"branches-path" => project_pipelines_path(@project, scope: :branches),
"tags-path" => project_pipelines_path(@project, scope: :tags),
"has-ci" => @repository.gitlab_ci_yml || @project.auto_devops_enabled?,
"has-ci" => @project.has_ci?,
"ci-lint-path" => ci_lint_path } }
= page_specific_javascript_bundle_tag('common_vue')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册