diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-30 14:58:19 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-30 14:58:19 +0000 |
commit | 91072f3125286adfb56d4633bc877ea6ace975e0 (patch) | |
tree | 2718ea887af88c749bac9b84f1132620d76ce1ae | |
parent | e92925533667e147ff34cf1e9b8af21680c8c7d4 (diff) | |
download | gitlab-ce-91072f3125286adfb56d4633bc877ea6ace975e0.tar.gz |
Add latest changes from gitlab-org/security/gitlab@15-8-stable-ee
-rw-r--r-- | lib/api/container_registry_event.rb | 12 | ||||
-rw-r--r-- | spec/requests/api/container_registry_event_spec.rb | 2 |
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 |