Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab_danger.rb')
-rw-r--r--lib/gitlab_danger.rb58
1 files changed, 0 insertions, 58 deletions
diff --git a/lib/gitlab_danger.rb b/lib/gitlab_danger.rb
deleted file mode 100644
index b0974e02edd..00000000000
--- a/lib/gitlab_danger.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# frozen_string_literal: true
-
-class GitlabDanger
- LOCAL_RULES ||= %w[
- changes_size
- documentation
- frozen_string
- duplicate_yarn_dependencies
- prettier
- eslint
- karma
- database
- commit_messages
- product_intelligence
- utility_css
- pajamas
- pipeline
- ].freeze
-
- CI_ONLY_RULES ||= %w[
- metadata
- changelog
- specs
- roulette
- ce_ee_vue_templates
- sidekiq_queues
- specialization_labels
- ci_templates
- ].freeze
-
- MESSAGE_PREFIX = '==>'.freeze
-
- attr_reader :gitlab_danger_helper
-
- def initialize(gitlab_danger_helper)
- @gitlab_danger_helper = gitlab_danger_helper
- end
-
- def self.local_warning_message
- "#{MESSAGE_PREFIX} Only the following Danger rules can be run locally: #{LOCAL_RULES.join(', ')}"
- end
-
- def self.success_message
- "#{MESSAGE_PREFIX} No Danger rule violations!"
- end
-
- def rule_names
- ci? ? LOCAL_RULES | CI_ONLY_RULES : LOCAL_RULES
- end
-
- def html_link(str)
- self.ci? ? gitlab_danger_helper.html_link(str) : str
- end
-
- def ci?
- !gitlab_danger_helper.nil?
- end
-end