summaryrefslogtreecommitdiff
path: root/danger
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-20 09:16:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-20 09:16:11 +0000
commitedaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch)
tree11f143effbfeba52329fb7afbd05e6e2a3790241 /danger
parentd8a5691316400a0f7ec4f83832698f1988eb27c1 (diff)
downloadgitlab-ce-edaa33dee2ff2f7ea3fac488d41558eb5f86d68c.tar.gz
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'danger')
-rw-r--r--danger/datateam/Dangerfile18
-rw-r--r--danger/plugins/datateam.rb9
2 files changed, 10 insertions, 17 deletions
diff --git a/danger/datateam/Dangerfile b/danger/datateam/Dangerfile
index 263fd4aa8e3..ed2703f31e6 100644
--- a/danger/datateam/Dangerfile
+++ b/danger/datateam/Dangerfile
@@ -1,19 +1,3 @@
# frozen_string_literal: true
-DATA_WAREHOUSE_LABELS = [
- "Data Warehouse::Impact Check",
- "Data Warehouse::Impacted",
- "Data Warehouse::Not Impacted"
-].freeze
-
-CHANGED_SCHEMA_MESSAGE = <<~MSG
-Notification to the Data Team about changes to the db/structure.sql file, add label `Data Warehouse::Impact Check`.
-
-/label ~"Data Warehouse::Impact Check"
-
-MSG
-
-db_schema_updated = !git.modified_files.grep(%r{\Adb/structure\.sql}).empty?
-no_data_warehouse_labels = (gitlab.mr_labels & DATA_WAREHOUSE_LABELS).empty?
-
-markdown(CHANGED_SCHEMA_MESSAGE) if db_schema_updated && no_data_warehouse_labels
+markdown(datateam.build_message) if datateam.impacted?
diff --git a/danger/plugins/datateam.rb b/danger/plugins/datateam.rb
new file mode 100644
index 00000000000..110414a50e2
--- /dev/null
+++ b/danger/plugins/datateam.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+require_relative '../../tooling/danger/datateam'
+
+module Danger
+ class Datateam < ::Danger::Plugin
+ include Tooling::Danger::Datateam
+ end
+end