Hey Everybody,
I am working on to add a branch restriction to an existing bitbucket repo using the below script but we are facing few errors as mentioned below.
We are using the below CURL Command to add a branch restriction.
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/workspace-name/repo-name/branch-restrictions' \
--header 'Accept: application/json' \
--user 'app-user-name:app-password' \
--data '{
"kind": "require_approvals_to_merge",
"pattern": "*",
"value": 2,
"branch_match_kind": "glob"
}'
Error Message:
{"type": "error", "error": {"message": "kind must be specified"}}
Any suggestions on what might be the issue/fix for this ?
Thanks in advance