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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 02:18:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 02:18:09 +0300
commit6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch)
treedc4d20fe6064752c0bd323187252c77e0a89144b /danger
parent9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff)
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'danger')
-rw-r--r--danger/Dangerfile-bundle_size33
-rw-r--r--danger/config_files/Dangerfile3
-rw-r--r--danger/database/Dangerfile5
-rw-r--r--danger/plugins/config_files.rb10
4 files changed, 16 insertions, 35 deletions
diff --git a/danger/Dangerfile-bundle_size b/danger/Dangerfile-bundle_size
index 23ab726096e..122002c1a7b 100644
--- a/danger/Dangerfile-bundle_size
+++ b/danger/Dangerfile-bundle_size
@@ -1,38 +1,7 @@
# frozen_string_literal: true
# This file isn't named "Dangerfile" so that it's not imported by default since it's only meant to be run in the `bundle-size-review` job.
-analysis_result = "./bundle-size-review/analysis.json"
-markdown_result = "./bundle-size-review/comparison.md"
-
-# Executing the webpack-entry-point-analyser
-# We would like to do that in the CI file directly,
-# but unfortunately the head_commit SHA is not available
-# as a CI variable due to our merge into master simulation
-analyze_cmd = [
- "webpack-entry-point-analyser",
- "--from-file ./webpack-report/stats.json",
- "--json #{analysis_result}",
- " --sha #{gitlab&.head_commit}"
-].join(" ")
-
-# execute analysis
-`#{analyze_cmd}`
-
-# We are executing the comparison by comparing the start_sha
-# to the current pipeline result. The start_sha is the commit
-# from master that was merged into for the merged pipeline.
-comparison_cmd = [
- "webpack-compare-reports",
- "--job #{ENV["CI_JOB_ID"]}",
- "--to-file #{analysis_result}",
- "--html ./bundle-size-review/comparison.html",
- "--markdown #{markdown_result}"
-].join(" ")
-
-# execute comparison
-`#{comparison_cmd}`
-
-comment = `cat #{markdown_result}`
+comment = `cat ./bundle-size-review/comparison.md`
unless comment.strip.empty?
markdown(<<~MARKDOWN)
diff --git a/danger/config_files/Dangerfile b/danger/config_files/Dangerfile
new file mode 100644
index 00000000000..dcd2e44df07
--- /dev/null
+++ b/danger/config_files/Dangerfile
@@ -0,0 +1,3 @@
+# frozen_string_literal: true
+
+config_files.add_suggestion_for_missing_introduced_by_url
diff --git a/danger/database/Dangerfile b/danger/database/Dangerfile
index 7b3a32358fe..df6ffab7c94 100644
--- a/danger/database/Dangerfile
+++ b/danger/database/Dangerfile
@@ -31,9 +31,8 @@ by removing the ~database label and re-running the [`danger-review` job](#{ENV['
MSG
DB_MIGRATION_TESTING_REQUIRED_MESSAGE = <<~MSG
-1. If this is not a ~"Community contribution" or from a Fork, kick off the
- `db:gitlabcom-database-testing` manual job.
-
+1. Kick off the `db:gitlabcom-database-testing` manual job. This job can also be used before
+ requesting review to test your migrations against production data.
MSG
DATABASE_APPROVED_LABEL = 'database::approved'
diff --git a/danger/plugins/config_files.rb b/danger/plugins/config_files.rb
new file mode 100644
index 00000000000..2604a491d03
--- /dev/null
+++ b/danger/plugins/config_files.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+require_relative '../../tooling/danger/config_files'
+
+module Danger
+ class ConfigFiles < ::Danger::Plugin
+ # Put the helper code somewhere it can be tested
+ include Tooling::Danger::ConfigFiles
+ end
+end