summaryrefslogtreecommitdiff
path: root/tooling
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-23 15:09:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-23 15:09:45 +0000
commit99c1dfd5e3f39868d65cb006078a8d091992fa54 (patch)
tree18d970852272c6d5ba303911da13d16cbff2514c /tooling
parent23634aa773e10e7df79247fb6fddbce88b825909 (diff)
downloadgitlab-ce-99c1dfd5e3f39868d65cb006078a8d091992fa54.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'tooling')
-rw-r--r--tooling/danger/user_types.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/tooling/danger/user_types.rb b/tooling/danger/user_types.rb
deleted file mode 100644
index 8320c43ae93..00000000000
--- a/tooling/danger/user_types.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-module Tooling
- module Danger
- module UserTypes
- FILE_PATH = "app/models/concerns/has_user_type.rb"
- BOT_USER_TYPES_CHANGE_INDICATOR_REGEX = %r{BOT_USER_TYPES}.freeze
- BOT_USER_TYPES_CHANGED_WARNING = <<~MSG
- You are changing BOT_USER_TYPES in `app/models/concerns/has_user_type.rb`.
- If you are adding or removing new bots, remember to update the `active_billable_users` index with the new value.
- If the bot is not billable, remember to make sure that it's not counted as a billable user.
- MSG
-
- def bot_user_types_change_warning
- return unless impacted?
-
- warn BOT_USER_TYPES_CHANGED_WARNING if bot_user_types_impacted?
- end
-
- private
-
- def impacted?
- helper.modified_files.include?(FILE_PATH)
- end
-
- def bot_user_types_impacted?
- helper.changed_lines(FILE_PATH).any? { |change| change =~ BOT_USER_TYPES_CHANGE_INDICATOR_REGEX }
- end
- end
- end
-end