diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /danger/datateam/Dangerfile | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) | |
download | gitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'danger/datateam/Dangerfile')
-rw-r--r-- | danger/datateam/Dangerfile | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/danger/datateam/Dangerfile b/danger/datateam/Dangerfile index 0a33cb6777b..263fd4aa8e3 100644 --- a/danger/datateam/Dangerfile +++ b/danger/datateam/Dangerfile @@ -1,15 +1,19 @@ # frozen_string_literal: true -# rubocop:disable Style/SignalException + +DATA_WAREHOUSE_LABELS = [ + "Data Warehouse::Impact Check", + "Data Warehouse::Impacted", + "Data Warehouse::Not Impacted" +].freeze CHANGED_SCHEMA_MESSAGE = <<~MSG -Mentioning @gitlab-data/engineers to notify the team about changes to the db/structure.sql file. +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? -if db_schema_updated - - markdown(CHANGED_SCHEMA_MESSAGE) - -end +markdown(CHANGED_SCHEMA_MESSAGE) if db_schema_updated && no_data_warehouse_labels |