mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-20 16:46:17 +00:00
Update from merge request
This commit is contained in:
@ -99,8 +99,7 @@ module API
|
||||
gl_root_namespace_id: project&.root_namespace&.id,
|
||||
gl_id: Gitlab::GlId.gl_id(actor.user),
|
||||
gl_username: actor.username,
|
||||
git_config_options: ["uploadpack.allowFilter=true",
|
||||
"uploadpack.allowAnySHA1InWant=true"],
|
||||
git_config_options: %w[uploadpack.allowFilter=true uploadpack.allowAnySHA1InWant=true],
|
||||
gitaly: gitaly_payload(params[:action]),
|
||||
gl_console_messages: check_result.console_messages,
|
||||
need_audit: need_git_audit_event?
|
||||
|
@ -32,6 +32,7 @@ module API
|
||||
requires :action, type: String
|
||||
requires :protocol, type: String
|
||||
requires :gl_repository, type: String # repository identifier, such as project-7
|
||||
requires :changes, type: String
|
||||
optional :check_ip, type: String
|
||||
optional :packfile_stats, type: Hash do
|
||||
# wants is the number of objects the client announced it wants.
|
||||
|
@ -763,6 +763,10 @@ RSpec.describe API::Internal::Base, feature_category: :system_access do
|
||||
it 'does not send a git streaming audit event' do
|
||||
expect(::Gitlab::Audit::Auditor).not_to receive(:audit)
|
||||
|
||||
allow_next_instance_of(::Gitlab::GitAuditEvent) do |audit|
|
||||
allow(audit).to receive(:enabled?).and_return(false)
|
||||
end
|
||||
|
||||
pull(key, project)
|
||||
|
||||
expect(response).to have_gitlab_http_status(:ok)
|
||||
@ -784,7 +788,7 @@ RSpec.describe API::Internal::Base, feature_category: :system_access do
|
||||
expect(json_response["gl_root_namespace_id"]).to eq(project.root_namespace.id)
|
||||
expect(json_response["gl_key_type"]).to eq("key")
|
||||
expect(json_response["gl_key_id"]).to eq(key.id)
|
||||
expect(json_response["need_audit"]).to be_falsy
|
||||
expect(json_response["need_audit"]).to be_truthy
|
||||
expect(json_response["gitaly"]).not_to be_nil
|
||||
expect(json_response["gitaly"]["repository"]).not_to be_nil
|
||||
expect(json_response["gitaly"]["repository"]["storage_name"]).to eq(project.repository.gitaly_repository.storage_name)
|
||||
|
Reference in New Issue
Block a user