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-09-27 12:08:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-27 12:08:07 +0300
commitb6f32e82a08a171debbb57236e8995b8d741e6a5 (patch)
tree44d876d957d94b7bb0e940cce64f96693997fe0f /lib/api/helpers.rb
parent605f9296cc7bb39665ea5d07b7dad9a8eda4c26d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 3bbc1d71852..db08bc6c63a 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -462,8 +462,8 @@ module API
items.search(text)
end
- def order_options_with_tie_breaker
- order_by = if params[:order_by] == 'created_at'
+ def order_options_with_tie_breaker(override_created_at: true)
+ order_by = if params[:order_by] == 'created_at' && override_created_at
'id'
else
params[:order_by]
@@ -700,7 +700,7 @@ module API
Gitlab::AppLogger.warn("Redis tracking event failed for event: #{event_name}, message: #{error.message}")
end
- def track_event(event_name, user:, namespace_id: nil, project_id: nil)
+ def track_event(event_name, user:, send_snowplow_event: true, namespace_id: nil, project_id: nil)
return unless user.present?
namespace = Namespace.find(namespace_id) if namespace_id
@@ -708,6 +708,7 @@ module API
Gitlab::InternalEvents.track_event(
event_name,
+ send_snowplow_event: send_snowplow_event,
user: user,
namespace: namespace,
project: project