Commit 3573e3ab authored by Shinya Maeda's avatar Shinya Maeda

Merge branch '331259-add-repository_update_events-support-to-webhooks-api' into 'master'

Accept the `repository_update_events` argument in the SystemHooks API

See merge request gitlab-org/gitlab!64670
parents 63eec98c d629b1a2
......@@ -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