diff options
Diffstat (limited to 'danger')
-rw-r--r-- | danger/changelog/Dangerfile | 3 | ||||
-rw-r--r-- | danger/database/Dangerfile | 4 | ||||
-rw-r--r-- | danger/documentation/Dangerfile | 4 | ||||
-rw-r--r-- | danger/feature_flag/Dangerfile | 2 | ||||
-rw-r--r-- | danger/plugins/changelog.rb | 10 | ||||
-rw-r--r-- | danger/product_intelligence/Dangerfile | 2 | ||||
-rw-r--r-- | danger/specialization_labels/Dangerfile | 3 | ||||
-rw-r--r-- | danger/specs/Dangerfile | 5 | ||||
-rw-r--r-- | danger/z_metadata/Dangerfile | 14 |
9 files changed, 9 insertions, 38 deletions
diff --git a/danger/changelog/Dangerfile b/danger/changelog/Dangerfile deleted file mode 100644 index 83c6f68869b..00000000000 --- a/danger/changelog/Dangerfile +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true - -changelog.check! diff --git a/danger/database/Dangerfile b/danger/database/Dangerfile index b4e06c21fe4..0128f0fa195 100644 --- a/danger/database/Dangerfile +++ b/danger/database/Dangerfile @@ -65,7 +65,7 @@ if gitlab.mr_labels.include?('database') || db_paths_to_review.any? markdown(DB_REMOVE_MESSAGE) end - unless helper.has_database_scoped_labels? - project_helper.labels_to_add << 'database::review pending' + unless helper.has_scoped_label_with_scope?("database") + helper.labels_to_add << 'database::review pending' end end diff --git a/danger/documentation/Dangerfile b/danger/documentation/Dangerfile index 918c787075e..41c75a9f176 100644 --- a/danger/documentation/Dangerfile +++ b/danger/documentation/Dangerfile @@ -5,7 +5,7 @@ def feature_mr? 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/engineering/ux/technical-writing/#designated-technical-writers). +~"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/engineering/ux/technical-writing/#assignments). For more information, see: @@ -36,6 +36,6 @@ markdown(<<~MARKDOWN) The review does not need to block merging this merge request. See the: - [Metadata for the `*.md` files](https://docs.gitlab.com/ee/development/documentation/#metadata) that you've changed. The first few lines of each `*.md` file identify the stage and group most closely associated with your docs change. - - The [Technical Writer assigned](https://about.gitlab.com/handbook/engineering/technical-writing/#designated-technical-writers) for that stage and group. + - The [Technical Writer assigned](https://about.gitlab.com/handbook/engineering/technical-writing/#assignments) for that stage and group. - [Documentation workflows](https://docs.gitlab.com/ee/development/documentation/workflow.html) for information on when to assign a merge request for review. MARKDOWN diff --git a/danger/feature_flag/Dangerfile b/danger/feature_flag/Dangerfile index d6c1c53cddc..5fe9d42a7a1 100644 --- a/danger/feature_flag/Dangerfile +++ b/danger/feature_flag/Dangerfile @@ -58,7 +58,7 @@ def message_for_feature_flag_with_group!(feature_flag:, mr_group_label:) return if feature_flag.group_match_mr_label?(mr_group_label) if mr_group_label.nil? - project_helper.labels_to_add << feature_flag.group + helper.labels_to_add << feature_flag.group else fail %(`group` is set to ~"#{feature_flag.group}" in #{gitlab.html_link(feature_flag.path)}, which does not match ~"#{mr_group_label}" set on the MR!) end diff --git a/danger/plugins/changelog.rb b/danger/plugins/changelog.rb deleted file mode 100644 index 02ff405c410..00000000000 --- a/danger/plugins/changelog.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -require_relative '../../tooling/danger/changelog' - -module Danger - class Changelog < ::Danger::Plugin - # Put the helper code somewhere it can be tested - include Tooling::Danger::Changelog - end -end diff --git a/danger/product_intelligence/Dangerfile b/danger/product_intelligence/Dangerfile index 01a2f9b6feb..8f782e3de65 100644 --- a/danger/product_intelligence/Dangerfile +++ b/danger/product_intelligence/Dangerfile @@ -19,4 +19,4 @@ return if product_intelligence_paths_to_review.empty? || product_intelligence.sk warn format(CHANGED_FILES_MESSAGE, changed_files: helper.markdown_list(product_intelligence_paths_to_review)) unless product_intelligence.has_approved_label? -project_helper.labels_to_add.concat(labels_to_add) unless labels_to_add.empty? +helper.labels_to_add.concat(labels_to_add) unless labels_to_add.empty? diff --git a/danger/specialization_labels/Dangerfile b/danger/specialization_labels/Dangerfile index cb4c8c96f4f..f161c470f36 100644 --- a/danger/specialization_labels/Dangerfile +++ b/danger/specialization_labels/Dangerfile @@ -9,7 +9,6 @@ SPECIALIZATIONS = { ux: 'UX', docs: 'documentation', qa: 'QA', - tooling: 'type::tooling', ci_template: 'ci::templates', feature_flag: 'feature flag' }.freeze @@ -26,4 +25,4 @@ labels_to_add = helper.changes_by_category.each_with_object([]) do |(category, _ memo << label end -project_helper.labels_to_add.concat(labels_to_add) if labels_to_add.any? +helper.labels_to_add.concat(labels_to_add) if labels_to_add.any? diff --git a/danger/specs/Dangerfile b/danger/specs/Dangerfile index c4f609f5806..8ef046f7bc1 100644 --- a/danger/specs/Dangerfile +++ b/danger/specs/Dangerfile @@ -1,9 +1,8 @@ # frozen_string_literal: true NO_SPECS_LABELS = [ - 'type::tooling', - 'tooling::pipelines', - 'tooling::workflow', + 'maintenance::pipelines', + 'maintenance::workflow', 'documentation', 'QA' ].freeze diff --git a/danger/z_metadata/Dangerfile b/danger/z_metadata/Dangerfile index 0a70554486f..546fdc8de5f 100644 --- a/danger/z_metadata/Dangerfile +++ b/danger/z_metadata/Dangerfile @@ -4,24 +4,10 @@ DEFAULT_BRANCH = 'master' -TYPE_LABELS = [ - 'type::feature', - 'feature::addition', - 'type::maintenance', - 'type::tooling', - 'tooling::pipelines', - 'tooling::workflow', - 'type::bug' -].freeze - if gitlab.mr_body.size < 5 fail "Please provide a proper merge request description." end -if (TYPE_LABELS & (gitlab.mr_labels + project_helper.labels_to_add)).empty? - warn 'Please add a [merge request type](https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification) to this merge request.' -end - unless gitlab.mr_json["assignee"] warn "This merge request does not have any assignee yet. Setting an assignee clarifies who needs to take action on the merge request at any given time." end |