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
9f32b46b
Commit
9f32b46b
authored
Jul 12, 2021
by
Tiger
Committed by
Albert Salim
Jul 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add instructions to Danger for removing an unnecessary DB review
parent
99e9d59c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
danger/database/Dangerfile
danger/database/Dangerfile
+11
-1
No files found.
danger/database/Dangerfile
View file @
9f32b46b
...
@@ -25,6 +25,11 @@ DB_FILES_MESSAGE = <<~MSG
...
@@ -25,6 +25,11 @@ DB_FILES_MESSAGE = <<~MSG
The following files require a review from the Database team:
The following files require a review from the Database team:
MSG
MSG
DB_REMOVE_MESSAGE
=
<<~
MSG
If you no longer require a database review, you can remove this suggestion
by removing the ~database label and re-running the [`danger-review` job](
#{
ENV
[
'CI_JOB_URL'
]
}
).
MSG
DATABASE_APPROVED_LABEL
=
'database::approved'
DATABASE_APPROVED_LABEL
=
'database::approved'
non_geo_db_schema_updated
=
!
git
.
modified_files
.
grep
(
%r{
\A
db/structure
\.
sql}
).
empty?
non_geo_db_schema_updated
=
!
git
.
modified_files
.
grep
(
%r{
\A
db/structure
\.
sql}
).
empty?
...
@@ -53,7 +58,12 @@ if gitlab.mr_labels.include?('database') || db_paths_to_review.any?
...
@@ -53,7 +58,12 @@ if gitlab.mr_labels.include?('database') || db_paths_to_review.any?
'review from the [Database team](https://gitlab.com/groups/gl-database/-/group_members).'
'review from the [Database team](https://gitlab.com/groups/gl-database/-/group_members).'
markdown
(
DB_MESSAGE
)
markdown
(
DB_MESSAGE
)
markdown
(
DB_FILES_MESSAGE
+
helper
.
markdown_list
(
db_paths_to_review
))
if
db_paths_to_review
.
any?
if
db_paths_to_review
.
any?
markdown
(
DB_FILES_MESSAGE
+
helper
.
markdown_list
(
db_paths_to_review
))
else
markdown
(
DB_REMOVE_MESSAGE
)
end
unless
helper
.
has_database_scoped_labels?
unless
helper
.
has_database_scoped_labels?
gitlab
.
api
.
update_merge_request
(
gitlab
.
mr_json
[
'project_id'
],
gitlab
.
api
.
update_merge_request
(
gitlab
.
mr_json
[
'project_id'
],
...
...
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