diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /danger | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'danger')
-rw-r--r-- | danger/architecture/Dangerfile | 27 | ||||
-rw-r--r-- | danger/documentation/Dangerfile | 6 | ||||
-rw-r--r-- | danger/pajamas/Dangerfile | 2 | ||||
-rw-r--r-- | danger/pipeline/Dangerfile | 2 | ||||
-rw-r--r-- | danger/rubygems/Dangerfile | 11 |
5 files changed, 44 insertions, 4 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 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[ <tabs bs-callout deprecated-modal - has-tooltip - has_tooltip initDeprecatedJQueryDropdown loading-button v-popover diff --git a/danger/pipeline/Dangerfile b/danger/pipeline/Dangerfile index 861d031915e..2fffd94be2e 100644 --- a/danger/pipeline/Dangerfile +++ b/danger/pipeline/Dangerfile @@ -6,7 +6,7 @@ MESSAGE = <<~MESSAGE This merge request contains changes to the pipeline configuration for the GitLab project. Please consider the effect of the changes in this merge request on the following: -- Effects on different [pipeline types](https://docs.gitlab.com/ee/development/pipelines.html#pipelines-for-merge-requests) +- Effects on different [pipeline types](https://docs.gitlab.com/ee/development/pipelines/index.html#pipelines-types-for-merge-requests) - Effects on non-canonical projects: - `gitlab-foss` - `security` diff --git a/danger/rubygems/Dangerfile b/danger/rubygems/Dangerfile new file mode 100644 index 00000000000..8e404d88fc1 --- /dev/null +++ b/danger/rubygems/Dangerfile @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +all_changed_files = helper.all_changed_files + +if all_changed_files.detect { |file| file == 'Gemfile' || file == 'Gemfile.lock' } + markdown <<~MSG + ## Rubygems + + This merge request adds, or changes a Rubygems dependency. Please review the [Gemfile guidelines](https://docs.gitlab.com/ee/development/gemfile.html). + MSG +end |