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

Dangerfile « datateam « danger - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 263fd4aa8e31d07f8d79e2d831e9ce9e45226342 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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