diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-09-12 10:21:47 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-09-13 12:36:04 +0300 |
commit | eeeea489fba033274dec2087798e2480d2139ab4 (patch) | |
tree | 94846a97367fb8c2a84b97f7c7693cf5fc3d85da /app/helpers/auto_devops_helper.rb | |
parent | 9c9b1774cbdc2a6cdfbbf8cd33e87e62294e729a (diff) |
AutoDevOps banner hidden on explicit CI config
Extends the helper method to no show the banner as soon as the project
has a `.gitlab-ci.yml` file on the default branch.
Fixes gitlab-org/gitlab-ce#37652
Diffstat (limited to 'app/helpers/auto_devops_helper.rb')
-rw-r--r-- | app/helpers/auto_devops_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/auto_devops_helper.rb b/app/helpers/auto_devops_helper.rb index c132daed323..c455d18cff8 100644 --- a/app/helpers/auto_devops_helper.rb +++ b/app/helpers/auto_devops_helper.rb @@ -3,6 +3,8 @@ module AutoDevopsHelper Feature.get(:auto_devops_banner_disabled).off? && show_callout?('auto_devops_settings_dismissed') && can?(current_user, :admin_pipeline, project) && - project.has_auto_devops_implicitly_disabled? + project.has_auto_devops_implicitly_disabled? && + !project.repository.gitlab_ci_yml && + project.ci_services.active.none? end end |