summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-30 19:18:34 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-30 19:18:34 +0000
commita3276f7cd1746329bc1958ffa5b59749fef92022 (patch)
tree27fbc4b6bf5a2ef4e83dedd754c2dc1ec39b3274
parent8da6d464b6ae9fd1248e18585f7426b6761c2c31 (diff)
downloadgitlab-ce-a3276f7cd1746329bc1958ffa5b59749fef92022.tar.gz
Add latest changes from gitlab-org/security/gitlab@15-7-stable-ee
-rw-r--r--lib/api/container_registry_event.rb12
-rw-r--r--spec/requests/api/container_registry_event_spec.rb2
2 files changed, 1 insertions, 13 deletions
diff --git a/lib/api/container_registry_event.rb b/lib/api/container_registry_event.rb
index 9467f09e4b6..a87ccb55193 100644
--- a/lib/api/container_registry_event.rb
+++ b/lib/api/container_registry_event.rb
@@ -32,18 +32,6 @@ module API
]
tags %w[container_registry_event]
end
- params do
- requires :events, type: Array, desc: 'Event notifications' do
- requires :action, type: String, desc: 'The action to perform, `push`, `delete`, `pull`',
- values: %w[push delete pull].freeze
- optional :target, type: Hash, desc: 'The target of the action' do
- optional :tag, type: String, desc: 'The target tag', documentation: { example: 'latest' }
- optional :repository, type: String, desc: 'The target repository', documentation: { example: 'group/p1' }
- optional :digest, type: String, desc: 'Unique identifier for target image manifest',
- documentation: { example: 'imagedigest' }
- end
- end
- end
# This endpoint is used by Docker Registry to push a set of event
# that took place recently.
diff --git a/spec/requests/api/container_registry_event_spec.rb b/spec/requests/api/container_registry_event_spec.rb
index 64c17bc2eef..e83a3faae93 100644
--- a/spec/requests/api/container_registry_event_spec.rb
+++ b/spec/requests/api/container_registry_event_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe API::ContainerRegistryEvent, feature_category: :container_registry do
let(:secret_token) { 'secret_token' }
- let(:events) { [{ action: 'push' }, { action: 'pull' }] }
+ let(:events) { [{ action: 'push' }, { action: 'pull' }, { action: 'mount' }] }
let(:registry_headers) { { 'Content-Type' => ::API::ContainerRegistryEvent::DOCKER_DISTRIBUTION_EVENTS_V1_JSON } }
describe 'POST /container_registry_event/events' do