Module: AutoDevopsHelper
- Included in:
- Projects::Security::ConfigurationPresenter
- Defined in:
- app/helpers/auto_devops_helper.rb
Instance Method Summary collapse
- #auto_devops_settings_path(project) ⇒ Object
- #badge_for_auto_devops_scope(auto_devops_receiver) ⇒ Object
- #show_auto_devops_callout?(project) ⇒ Boolean
Instance Method Details
#auto_devops_settings_path(project) ⇒ Object
26 27 28 |
# File 'app/helpers/auto_devops_helper.rb', line 26 def auto_devops_settings_path(project) project_settings_ci_cd_path(project, anchor: 'autodevops-settings') end |
#badge_for_auto_devops_scope(auto_devops_receiver) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/helpers/auto_devops_helper.rb', line 13 def badge_for_auto_devops_scope(auto_devops_receiver) return unless auto_devops_receiver.auto_devops_enabled? case auto_devops_receiver.first_auto_devops_config[:scope] when :project nil when :group s_('CICD|group enabled') when :instance s_('CICD|instance enabled') end end |
#show_auto_devops_callout?(project) ⇒ Boolean
4 5 6 7 8 9 10 11 |
# File 'app/helpers/auto_devops_helper.rb', line 4 def show_auto_devops_callout?(project) Feature.disabled?(:auto_devops_banner_disabled) && show_callout?('auto_devops_settings_dismissed') && can?(current_user, :admin_pipeline, project) && project.has_auto_devops_implicitly_disabled? && !project.has_ci_config_file? && !project.ci_integration end |