diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /danger/database | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'danger/database')
-rw-r--r-- | danger/database/Dangerfile | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/danger/database/Dangerfile b/danger/database/Dangerfile index cd56ea8dd22..3018196ddbc 100644 --- a/danger/database/Dangerfile +++ b/danger/database/Dangerfile @@ -25,6 +25,11 @@ DB_FILES_MESSAGE = <<~MSG The following files require a review from the Database team: 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' non_geo_db_schema_updated = !git.modified_files.grep(%r{\Adb/structure\.sql}).empty? @@ -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).' 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? gitlab.api.update_merge_request(gitlab.mr_json['project_id'], |