class GitlabDanger
Constants
- MESSAGE_PREFIX
Attributes
gitlab_danger_helper[R]
Public Class Methods
local_warning_message()
click to toggle source
# File lib/gitlab_roulette/gitlab_danger.rb, line 34 def self.local_warning_message "#{MESSAGE_PREFIX} Only the following Danger rules can be run locally: #{LOCAL_RULES.join(', ')}" end
new(gitlab_danger_helper)
click to toggle source
# File lib/gitlab_roulette/gitlab_danger.rb, line 30 def initialize(gitlab_danger_helper) @gitlab_danger_helper = gitlab_danger_helper end
success_message()
click to toggle source
# File lib/gitlab_roulette/gitlab_danger.rb, line 38 def self.success_message "#{MESSAGE_PREFIX} No Danger rule violations!" end
Public Instance Methods
ci?()
click to toggle source
# File lib/gitlab_roulette/gitlab_danger.rb, line 50 def ci? !gitlab_danger_helper.nil? end
html_link(str)
click to toggle source
# File lib/gitlab_roulette/gitlab_danger.rb, line 46 def html_link(str) self.ci? ? gitlab_danger_helper.html_link(str) : str end
rule_names()
click to toggle source
# File lib/gitlab_roulette/gitlab_danger.rb, line 42 def rule_names ci? ? LOCAL_RULES | CI_ONLY_RULES : LOCAL_RULES end