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
path: root/danger
diff options
context:
space:
mode:
Diffstat (limited to 'danger')
-rw-r--r--danger/ci_templates/Dangerfile2
-rw-r--r--danger/database/Dangerfile2
-rw-r--r--danger/documentation/Dangerfile2
-rw-r--r--danger/product_intelligence/Dangerfile2
-rw-r--r--danger/roulette/Dangerfile6
-rw-r--r--danger/specialization_labels/Dangerfile2
-rw-r--r--danger/specs/Dangerfile2
7 files changed, 8 insertions, 10 deletions
diff --git a/danger/ci_templates/Dangerfile b/danger/ci_templates/Dangerfile
index fcd9080e7d1..3d57436ef94 100644
--- a/danger/ci_templates/Dangerfile
+++ b/danger/ci_templates/Dangerfile
@@ -17,7 +17,7 @@ MSG
return unless helper.ci?
-template_paths_to_review = project_helper.changes_by_category[:ci_template]
+template_paths_to_review = helper.changes_by_category[:ci_template]
if gitlab.mr_labels.include?('ci::templates') || template_paths_to_review.any?
message 'This merge request adds or changes files that require a ' \
diff --git a/danger/database/Dangerfile b/danger/database/Dangerfile
index 70adbb4c139..b4e06c21fe4 100644
--- a/danger/database/Dangerfile
+++ b/danger/database/Dangerfile
@@ -51,7 +51,7 @@ end
return unless helper.ci?
return if gitlab.mr_labels.include?(DATABASE_APPROVED_LABEL)
-db_paths_to_review = project_helper.changes_by_category[:database]
+db_paths_to_review = helper.changes_by_category[:database]
if gitlab.mr_labels.include?('database') || db_paths_to_review.any?
message 'This merge request adds or changes files that require a ' \
diff --git a/danger/documentation/Dangerfile b/danger/documentation/Dangerfile
index 01ef5dbb49e..918c787075e 100644
--- a/danger/documentation/Dangerfile
+++ b/danger/documentation/Dangerfile
@@ -13,7 +13,7 @@ For more information, see:
- The [definition of done](https://docs.gitlab.com/ee/development/contributing/merge_request_workflow.html#definition-of-done) documentation.
MSG
-docs_paths_to_review = project_helper.changes_by_category[:docs]
+docs_paths_to_review = helper.changes_by_category[:docs]
# Documentation should be updated for feature::addition and feature::enhancement
if docs_paths_to_review.empty?
diff --git a/danger/product_intelligence/Dangerfile b/danger/product_intelligence/Dangerfile
index eedb9b89d22..1c0c918dbfc 100644
--- a/danger/product_intelligence/Dangerfile
+++ b/danger/product_intelligence/Dangerfile
@@ -12,7 +12,7 @@ For MR review guidelines, see the [Service Ping review guidelines](https://docs.
MSG
# exit if not matching files or if no product intelligence labels
-product_intelligence_paths_to_review = project_helper.changes_by_category[:product_intelligence]
+product_intelligence_paths_to_review = helper.changes_by_category[:product_intelligence]
labels_to_add = product_intelligence.missing_labels
return if product_intelligence_paths_to_review.empty? || labels_to_add.empty?
diff --git a/danger/roulette/Dangerfile b/danger/roulette/Dangerfile
index 6b0c196dc5d..cdea635e808 100644
--- a/danger/roulette/Dangerfile
+++ b/danger/roulette/Dangerfile
@@ -89,7 +89,7 @@ def markdown_row_for_spins(category, spins_array)
"| #{helper.label_for_category(category)} | #{reviewer_note} | #{maintainer_note} |"
end
-changes = project_helper.changes_by_category
+changes = helper.changes_by_category
# Ignore any files that are known but uncategorized. Prompt for any unknown files
changes.delete(:none)
@@ -114,9 +114,7 @@ categories << :product_intelligence if helper.mr_labels.include?("product intell
categories.delete(:product_intelligence) unless helper.mr_labels.include?("growth experiment")
if changes.any?
- project = project_helper.project_name
-
- random_roulette_spins = roulette.spin(project, categories, timezone_experiment: false)
+ random_roulette_spins = roulette.spin(nil, categories, timezone_experiment: false)
rows = random_roulette_spins.map do |spin|
markdown_row_for_spins(spin.category, [spin])
diff --git a/danger/specialization_labels/Dangerfile b/danger/specialization_labels/Dangerfile
index 24a759cddc8..cb4c8c96f4f 100644
--- a/danger/specialization_labels/Dangerfile
+++ b/danger/specialization_labels/Dangerfile
@@ -14,7 +14,7 @@ SPECIALIZATIONS = {
feature_flag: 'feature flag'
}.freeze
-labels_to_add = project_helper.changes_by_category.each_with_object([]) do |(category, _changes), memo|
+labels_to_add = helper.changes_by_category.each_with_object([]) do |(category, _changes), memo|
label = SPECIALIZATIONS[category]
next unless label
next if gitlab.mr_labels.include?(label)
diff --git a/danger/specs/Dangerfile b/danger/specs/Dangerfile
index 067fb62807a..c4f609f5806 100644
--- a/danger/specs/Dangerfile
+++ b/danger/specs/Dangerfile
@@ -50,7 +50,7 @@ if has_ee_app_changes && has_spec_changes && !(has_app_changes || has_ee_spec_ch
end
# Forbidding a new file addition under `/spec/controllers` or `/ee/spec/controllers`
-if project_helper.changes.added.files.grep(%r{^(ee/)?spec/controllers/}).any?
+if helper.changes.added.files.grep(%r{^(ee/)?spec/controllers/}).any?
warn CONTROLLER_SPEC_DEPRECATION_MESSAGE
end