diff --git a/app/models/project.rb b/app/models/project.rb index f8cc27d5569b43f3b2d70a83123d164af860930c..541c950e3699791ce08e46c28ecb44beeb05b3a5 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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 }, diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 3ce203780388a6e8faa71b3781186dbde1ccbb98..579f681abaaa7236d21d906e09c1b5a945a47a73 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -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')