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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-06 18:14:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-06 18:14:05 +0300
commit49b16b71778148e9f9c579bf7bf69853c780c827 (patch)
tree48fe268b98795b8e2af1fa0b40ee5b67b35a4479 /lib/gitlab/usage_data_counters
parent9ad806210531e19c851a69cbcdaf9ed8bd6cb478 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/usage_data_counters')
-rw-r--r--lib/gitlab/usage_data_counters/gitlab_cli_activity_unique_counter.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/usage_data_counters/gitlab_cli_activity_unique_counter.rb b/lib/gitlab/usage_data_counters/gitlab_cli_activity_unique_counter.rb
index 8a57a0331b8..b30c4b675f9 100644
--- a/lib/gitlab/usage_data_counters/gitlab_cli_activity_unique_counter.rb
+++ b/lib/gitlab/usage_data_counters/gitlab_cli_activity_unique_counter.rb
@@ -4,7 +4,9 @@ module Gitlab
module UsageDataCounters
module GitLabCliActivityUniqueCounter
GITLAB_CLI_API_REQUEST_ACTION = 'i_code_review_user_gitlab_cli_api_request'
- GITLAB_CLI_USER_AGENT_REGEX = /GitLab\sCLI$/.freeze
+
+ # This regex will match to user agents ending with GitLab CLI or starting with glab/v"
+ GITLAB_CLI_USER_AGENT_REGEX = %r{(GitLab\sCLI$|^glab/v)}.freeze
class << self
def track_api_request_when_trackable(user_agent:, user:)