Hi All,
I'm trying to hit the following curl:
curl --location --request POST 'https://api.bitbucket.org/2.0/repositories/<workspace>/<repo>/pullrequests/1493/merge' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
}'
I have created the access_token from Repository settings > Access tokens for this repo, on Bitbucket Cloud website. All the permissions are checked except Delete repo.
I'm getting the following error response:
{
"type": "error",
"error": {
"message": "newstatus: Merging a pull request requires write access to the destination branch.",
"fields": {
"newstatus": [
"Merging a pull request requires write access to the destination branch."
]
}
}
}
I'm getting the option to Merge the PR from the UI but API is failing.
I've attached the permissions screenshot.