summaryrefslogtreecommitdiff
path: root/tooling
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-04 09:09:59 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-04 09:09:59 +0000
commite2c471038ab2b4f09487c1feb74520f74f834986 (patch)
tree21d8ea3ce88222c1419adaa2f79012326f29621e /tooling
parent04a893be75405b262c0899bd09eb79438210e632 (diff)
downloadgitlab-ce-e2c471038ab2b4f09487c1feb74520f74f834986.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'tooling')
-rw-r--r--tooling/danger/project_helper.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/tooling/danger/project_helper.rb b/tooling/danger/project_helper.rb
index b60a3aa1adc..7aac0de0b6b 100644
--- a/tooling/danger/project_helper.rb
+++ b/tooling/danger/project_helper.rb
@@ -5,6 +5,7 @@ module Tooling
module ProjectHelper
LOCAL_RULES ||= %w[
changelog
+ changes_size
commit_messages
database
datateam
@@ -175,12 +176,26 @@ module Tooling
ee? ? 'gitlab' : 'gitlab-foss'
end
+ def missing_database_labels(current_mr_labels)
+ labels = if has_database_scoped_labels?(current_mr_labels)
+ ['database']
+ else
+ ['database', 'database::review pending']
+ end
+
+ labels - current_mr_labels
+ end
+
private
def ee?
# Support former project name for `dev` and support local Danger run
%w[gitlab gitlab-ee].include?(ENV['CI_PROJECT_NAME']) || Dir.exist?(File.expand_path('../../../ee', __dir__))
end
+
+ def has_database_scoped_labels?(current_mr_labels)
+ current_mr_labels.any? { |label| label.start_with?('database::') }
+ end
end
end
end