Reputation: 284
I'm attempting to add a webhook to a project on Gitlab. See docs
I can GET current hooks from the project with the following command so I know I'm hitting gitlab successfully:
curl -k --request GET --header "PRIVATE-TOKEN: <token>" <url>/api/v4/projects/<projectID>/hooks
However, I'm having issue creating a hook with a specific attribute. I can create a hook with the following command:
curl -k --request POST --header "PRIVATE-TOKEN: <token>" <url>/api/v4/projects/<projectID>/hooks?url=<hookURL>
I want to set the "merge_requests_attribute" to "true". It is "false" by default. However, I'm unsure how to set this in the command
Upvotes: 0
Views: 1577
Reputation: 284
I resolved this so may as well post the answer:
Attributes on Gitlab can be manipulated with the --data
tag.
So, in my case the command would include
--data "merge_requests_events=true"
Upvotes: 2