Hi everyone,
I am trying to add branch restrictions on a repository in Bitbucket Cloud using the Rest Api V2. Below is my script
read -r -d '' JSON <<'EOF'
{
{
"kind": "require_passing_builds_to_merge",
"pattern": "*",
"value": 1,
"branch_match_kind": "glob",
"groups": [
],
}
}
EOF
curl -i --request POST --data "$JSON" \
--url "https://api.bitbucket.org/2.0/repositories/aanict/rconfig/branch-restrictions/" \
--header "authorization: Bearer $ACCESS_TOKEN" --header "Content-Type: application/json"
Unfortunately, it return a error: 400 Bad request.
Any idea of what might causing this?
Thanks.