From 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 17 Nov 2022 11:33:21 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-6-stable-ee --- danger/architecture/Dangerfile | 27 +++++++++++++++++++++++++++ danger/documentation/Dangerfile | 6 +++++- danger/pajamas/Dangerfile | 2 -- danger/pipeline/Dangerfile | 2 +- danger/rubygems/Dangerfile | 11 +++++++++++ 5 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 danger/architecture/Dangerfile create mode 100644 danger/rubygems/Dangerfile (limited to 'danger') 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 diff --git a/danger/documentation/Dangerfile b/danger/documentation/Dangerfile index eaa1839c8e5..1e94af391c8 100644 --- a/danger/documentation/Dangerfile +++ b/danger/documentation/Dangerfile @@ -4,6 +4,10 @@ def feature_mr? (helper.mr_labels & %w[feature::addition feature::enhancement]).any? end +def doc_path_to_url(path) + path.sub("doc/", "https://docs.gitlab.com/ee/").sub("index.md", "").sub(".md", "/") +end + DOCUMENTATION_UPDATE_MISSING = <<~MSG ~"feature::addition" and ~"feature::enhancement" merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the [Technical Writer counterpart](https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments). @@ -31,7 +35,7 @@ markdown(<<~MARKDOWN) The following files require a review from a technical writer: - * #{docs_paths_to_review.map { |path| "`#{path}`" }.join("\n* ")} + * #{docs_paths_to_review.map { |path| "`#{path}` ([Link to current live version](#{doc_path_to_url(path)}))" }.join("\n* ")} The review does not need to block merging this merge request. See the: diff --git a/danger/pajamas/Dangerfile b/danger/pajamas/Dangerfile index fde12c08b35..5fe9e9e8b19 100644 --- a/danger/pajamas/Dangerfile +++ b/danger/pajamas/Dangerfile @@ -20,8 +20,6 @@ PATTERNS = %w[