Commit 5941f3a7 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Implement `Project#has_ci?`

parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment