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>2023-09-20 14:18:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-20 14:18:08 +0300
commit5afcbe03ead9ada87621888a31a62652b10a7e4f (patch)
tree9918b67a0d0f0bafa6542e839a8be37adf73102d /danger
parentc97c0201564848c1f53226fe19d71fdcc472f7d0 (diff)
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'danger')
-rw-r--r--danger/architecture/Dangerfile2
-rw-r--r--danger/clickhouse/Dangerfile29
-rw-r--r--danger/ignored_model_columns/Dangerfile3
-rw-r--r--danger/plugins/clickhouse.rb10
-rw-r--r--danger/plugins/ignored_model_columns.rb9
-rw-r--r--danger/qa_selector/Dangerfile4
-rw-r--r--danger/roulette/Dangerfile11
7 files changed, 62 insertions, 6 deletions
diff --git a/danger/architecture/Dangerfile b/danger/architecture/Dangerfile
index 148180247fe..a8cfbab394f 100644
--- a/danger/architecture/Dangerfile
+++ b/danger/architecture/Dangerfile
@@ -7,7 +7,7 @@ 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/).
+This merge request might require a review from a [Coach Engineer](https://about.gitlab.com/handbook/engineering/architecture/workflow/).
MSG
BLUEPRINT_LONG_MESSAGE = <<~MSG
diff --git a/danger/clickhouse/Dangerfile b/danger/clickhouse/Dangerfile
new file mode 100644
index 00000000000..91fa45541e7
--- /dev/null
+++ b/danger/clickhouse/Dangerfile
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+CH_MESSAGE = <<~MSG
+This merge request requires a ClickHouse review. To make sure these
+changes are reviewed, take the following steps:
+
+1. Ensure the merge request has ~clickhouse and ~"clickhouse::review pending" labels.
+1. Assign and mention a ClickHouse reviewer.
+MSG
+
+CH_UNREVIEWED_LABEL = 'clickhouse::review pending'
+CH_APPROVED_LABEL = 'clickhouse::approved'
+
+CH_URL =
+ 'https://gitlab.com/groups/gitlab-org/maintainers/clickhouse/-/group_members?with_inherited_permissions=exclude'
+
+return if stable_branch.valid_stable_branch?
+return if helper.mr_labels.include?(CH_UNREVIEWED_LABEL)
+
+helper.labels_to_add << 'clickhouse' if clickhouse.changes.any?
+
+if helper.mr_labels.include?('clickhouse') || clickhouse.changes.any?
+ message 'This merge request adds or changes files that require a ' \
+ 'review from the [GitLab ClickHouse team](CH_URL).'
+
+ markdown(CH_MESSAGE)
+
+ helper.labels_to_add << CH_UNREVIEWED_LABEL unless helper.has_scoped_label_with_scope?("clickhouse")
+end
diff --git a/danger/ignored_model_columns/Dangerfile b/danger/ignored_model_columns/Dangerfile
new file mode 100644
index 00000000000..e11566f90f2
--- /dev/null
+++ b/danger/ignored_model_columns/Dangerfile
@@ -0,0 +1,3 @@
+# frozen_string_literal: true
+
+ignored_model_columns.add_comment_for_ignored_model_columns
diff --git a/danger/plugins/clickhouse.rb b/danger/plugins/clickhouse.rb
new file mode 100644
index 00000000000..324a0e5c1a9
--- /dev/null
+++ b/danger/plugins/clickhouse.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+require_relative '../../tooling/danger/clickhouse'
+
+module Danger
+ class Clickhouse < ::Danger::Plugin
+ # Put the helper code somewhere it can be tested
+ include Tooling::Danger::Clickhouse
+ end
+end
diff --git a/danger/plugins/ignored_model_columns.rb b/danger/plugins/ignored_model_columns.rb
new file mode 100644
index 00000000000..8e0024a94d6
--- /dev/null
+++ b/danger/plugins/ignored_model_columns.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+require_relative '../../tooling/danger/ignored_model_columns'
+
+module Danger
+ class IgnoredModelColumns < ::Danger::Plugin
+ include Tooling::Danger::IgnoredModelColumns
+ end
+end
diff --git a/danger/qa_selector/Dangerfile b/danger/qa_selector/Dangerfile
index 57f992ec160..c8450bffe27 100644
--- a/danger/qa_selector/Dangerfile
+++ b/danger/qa_selector/Dangerfile
@@ -2,13 +2,15 @@
return if helper.stable_branch?
-data_testids = /testid|data-testid|find_by_testid|within_testid/
+data_testids = /testid/
deprecated_qa_selectors = /(?=qa_selector|data-qa-selector)|(?!.*\bdata-qa-)(?=class=.*qa-.*|class: .*qa-.*)/
def filter_changed_lines(files, pattern)
lines = []
files.each do |file|
+ next if file.start_with?('spec/', 'ee/spec/', 'qa/')
+
testid_changed_lines = helper.changed_lines(file).select { |line| line =~ pattern }
next unless testid_changed_lines.any?
diff --git a/danger/roulette/Dangerfile b/danger/roulette/Dangerfile
index 33fcb6cb807..ba0efcc720e 100644
--- a/danger/roulette/Dangerfile
+++ b/danger/roulette/Dangerfile
@@ -16,11 +16,14 @@ MARKDOWN
POST_TABLE_MESSAGE = <<MARKDOWN
-To spread load more evenly across eligible reviewers, Danger has picked a candidate for each
-review slot, based on their timezone. Feel free to
-[override these selections](https://about.gitlab.com/handbook/engineering/projects/#gitlab)
+**Please check reviewer's status!**
+- ![available](https://gitlab-org.gitlab.io/gitlab-roulette/status-svg/_success.svg) Reviewer is available!
+- ![unavailable](https://gitlab-org.gitlab.io/gitlab-roulette/status-svg/_alert.svg) Reviewer is unavailable!
+
+Feel free to [override these selections](https://about.gitlab.com/handbook/engineering/projects/#gitlab)
if you think someone else would be better-suited
-or use the [GitLab Review Workload Dashboard](https://gitlab-org.gitlab.io/gitlab-roulette/) to find other available reviewers.
+or use the [GitLab Review Workload Dashboard](https://gitlab-org.gitlab.io/gitlab-roulette/)
+to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the
[Engineering workflow](https://about.gitlab.com/handbook/engineering/workflow/#basics)