gitlab-org--gitlab-foss/app/helpers/auto_devops_helper.rb
Mayra Cabrera d9af3752fc Addresses UX and BE comments:
- Changes help text on clusters form to make it more explicit.
- Removes unnecessary warnings on auto devops form
- Simplifies cluster methods logic
2019-02-06 21:51:48 -06:00

12 lines
394 B
Ruby

# frozen_string_literal: true
module AutoDevopsHelper
def show_auto_devops_callout?(project)
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.repository.gitlab_ci_yml &&
!project.ci_service
end
end