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/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-23 12:06:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-23 12:06:03 +0300
commitb3e4ec8e8adf4fe96c982124e91b6a05021a9cda (patch)
tree5fda0011a7cc7de000186e465e61f893d478a1c8 /lib
parent90cdc9391171e1be29b2b57a2e2aad0c02c2a7a9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/gitaly_client/namespace_service.rb6
-rw-r--r--lib/gitlab/shell.rb12
-rw-r--r--lib/gitlab/tracking.rb5
3 files changed, 3 insertions, 20 deletions
diff --git a/lib/gitlab/gitaly_client/namespace_service.rb b/lib/gitlab/gitaly_client/namespace_service.rb
index 0be214f3035..f95833eed01 100644
--- a/lib/gitlab/gitaly_client/namespace_service.rb
+++ b/lib/gitlab/gitaly_client/namespace_service.rb
@@ -7,12 +7,6 @@ module Gitlab
@storage = storage
end
- def exists?(name)
- request = Gitaly::NamespaceExistsRequest.new(storage_name: @storage, name: name)
-
- gitaly_client_call(:namespace_exists, request, timeout: GitalyClient.fast_timeout).exists
- end
-
def add(name)
request = Gitaly::AddNamespaceRequest.new(storage_name: @storage, name: name)
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb
index 125d0d1cfbb..28e5d0ba8f5 100644
--- a/lib/gitlab/shell.rb
+++ b/lib/gitlab/shell.rb
@@ -285,18 +285,6 @@ module Gitlab
end
end
- # Check if such directory exists in repositories.
- #
- # Usage:
- # exists?(storage, 'gitlab')
- # exists?(storage, 'gitlab/cookies.git')
- #
- # rubocop: disable CodeReuse/ActiveRecord
- def exists?(storage, dir_name)
- Gitlab::GitalyClient::NamespaceService.new(storage).exists?(dir_name)
- end
- # rubocop: enable CodeReuse/ActiveRecord
-
def repository_exists?(storage, dir_name)
Gitlab::Git::Repository.new(storage, dir_name, nil, nil).exists?
rescue GRPC::Internal
diff --git a/lib/gitlab/tracking.rb b/lib/gitlab/tracking.rb
index 2470685bc00..d254d64dad2 100644
--- a/lib/gitlab/tracking.rb
+++ b/lib/gitlab/tracking.rb
@@ -39,7 +39,7 @@ module Gitlab
snowplow.track_self_describing_event(event_json, context, Time.now.to_i)
end
- def snowplow_options(group)
+ def snowplow_options(group, user)
additional_features = Feature.enabled?(:additional_snowplow_tracking, group)
{
namespace: SNOWPLOW_NAMESPACE,
@@ -47,7 +47,8 @@ module Gitlab
cookie_domain: Gitlab::CurrentSettings.snowplow_cookie_domain,
app_id: Gitlab::CurrentSettings.snowplow_site_id,
form_tracking: additional_features,
- link_click_tracking: additional_features
+ link_click_tracking: additional_features,
+ user_id: user&.id
}.transform_keys! { |key| key.to_s.camelize(:lower).to_sym }
end