Apparently, using API 1.0 it was possible to check if a Pull Request satisfied merge checks by making GET request to the merge endpoint. The same thing doesn't work in 2.0:
https://api.bitbucket.org/2.0/repositories/<workspace>/<repo>/pullrequests/<pull_request_id>/merge
Unfortunately this does not work any longer and when making a GET request to this endpoint I get a strange error:
`This endpoint does not support token-based authentication`
Though, I am just using Basic Authentication
I found the "canMerge" value in 1.0 very useful because we have multiple repos we sometimes need to merge code to at once. It would save me a lot of code if something was similar in 2.0, but there isn't. I had to resort to checking the PR events for approvals to see if required approves had approved, and checking for merge conflicts manually instead. Messy mess.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.