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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/danger
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-08 21:11:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-08 21:11:09 +0300
commitda576e4a0b8e1adc3df559a163b01c962a565ef5 (patch)
treef563a8746fd54a2d638f6b421955220af24c8489 /danger
parentb5bdf6e5219b3b57107aee49ba7c103affb65dd9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger')
-rw-r--r--danger/architecture/Dangerfile27
1 files changed, 27 insertions, 0 deletions
diff --git a/danger/architecture/Dangerfile b/danger/architecture/Dangerfile
new file mode 100644
index 00000000000..148180247fe
--- /dev/null
+++ b/danger/architecture/Dangerfile
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+BLUEPRINT_LABEL = 'Architecture Evolution Blueprint'
+
+return unless helper.ci?
+
+blueprint_changes = helper.changed_files(%r{^doc/architecture/blueprints/.*})
+
+BLUEPRINT_SHORT_MESSAGE = <<~MSG
+This merge request requires a review from an [Architecture Evolution Coach](https://about.gitlab.com/handbook/engineering/architecture/workflow/).
+MSG
+
+BLUEPRINT_LONG_MESSAGE = <<~MSG
+## Architecture Evolution Review
+
+#{BLUEPRINT_SHORT_MESSAGE}
+
+Following files, that may require the additional review, have been changed:
+#{helper.markdown_list(blueprint_changes.to_set)}
+MSG
+
+if blueprint_changes.any?
+ message(BLUEPRINT_SHORT_MESSAGE)
+ markdown(BLUEPRINT_LONG_MESSAGE)
+
+ helper.labels_to_add.push(BLUEPRINT_LABEL) unless helper.mr_has_labels?(BLUEPRINT_LABEL)
+end