Commit 1d595e9a authored by Rémy Coutable's avatar Rémy Coutable

Danger: don't require a review when 'database::approved' is set

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent f96750dd
...@@ -29,6 +29,8 @@ DB_FILES_MESSAGE = <<~MSG ...@@ -29,6 +29,8 @@ 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
DATABASE_APPROVED_LABEL = 'database::approved'
non_geo_db_schema_updated = !git.modified_files.grep(%r{\Adb/schema\.rb}).empty? non_geo_db_schema_updated = !git.modified_files.grep(%r{\Adb/schema\.rb}).empty?
geo_db_schema_updated = !git.modified_files.grep(%r{\Aee/db/geo/schema\.rb}).empty? geo_db_schema_updated = !git.modified_files.grep(%r{\Aee/db/geo/schema\.rb}).empty?
...@@ -46,6 +48,7 @@ if geo_migration_created && !geo_db_schema_updated ...@@ -46,6 +48,7 @@ if geo_migration_created && !geo_db_schema_updated
end end
return unless gitlab_danger.ci? return unless gitlab_danger.ci?
return if gitlab.mr_labels.include?(DATABASE_APPROVED_LABEL)
db_paths_to_review = helper.changes_by_category[:database] db_paths_to_review = helper.changes_by_category[:database]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment