Commit d629b1a2 authored by Luke Duncalfe's avatar Luke Duncalfe

Accept repository_update_events in SystemHooks API

This adds support for the `repository_update_events` argument in the
SystemHooks API.

https://gitlab.com/gitlab-org/gitlab/-/issues/331259

Changelog: added
parent 6f593b85
......@@ -31,6 +31,7 @@ module API
optional :push_events, type: Boolean, desc: "Trigger hook on push events"
optional :tag_push_events, type: Boolean, desc: "Trigger hook on tag push events"
optional :merge_requests_events, type: Boolean, desc: "Trigger hook on tag push events"
optional :repository_update_events, type: Boolean, desc: "Trigger hook on repository update events"
optional :enable_ssl_verification, type: Boolean, desc: "Do SSL verification when triggering the hook"
end
post do
......
......@@ -81,6 +81,7 @@ RSpec.describe API::SystemHooks do
expect(json_response['push_events']).to be false
expect(json_response['tag_push_events']).to be false
expect(json_response['merge_requests_events']).to be false
expect(json_response['repository_update_events']).to be true
end
it 'sets explicit values for events' do
......@@ -92,7 +93,8 @@ RSpec.describe API::SystemHooks do
enable_ssl_verification: false,
push_events: true,
tag_push_events: true,
merge_requests_events: true
merge_requests_events: true,
repository_update_events: false
}
expect(response).to have_gitlab_http_status(:created)
......@@ -100,6 +102,7 @@ RSpec.describe API::SystemHooks do
expect(json_response['push_events']).to be true
expect(json_response['tag_push_events']).to be true
expect(json_response['merge_requests_events']).to be true
expect(json_response['repository_update_events']).to be false
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment