Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
efc56511
Commit
efc56511
authored
Jul 14, 2021
by
Dennis van Rooijen
Committed by
Albert Salim
Jul 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add data warehouse labels to MR upon schema change
parent
f1dd0d9f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
danger/datateam/Dangerfile
danger/datateam/Dangerfile
+12
-2
No files found.
danger/datateam/Dangerfile
View file @
efc56511
# 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{
\A
db/structure
\.
sql}
).
empty?
if
db_schema_updated
no_data_warehouse_labels
=
(
gitlab
.
mr_labels
&
DATA_WAREHOUSE_LABELS
).
empty?
if
db_schema_updated
&&
no_data_warehouse_labels
markdown
(
CHANGED_SCHEMA_MESSAGE
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment