Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket Cloud: Verify Merge Checks via API 2

peter_warmenhoven
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 10, 2020

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

1 answer

0 votes
Michael Gutierrez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 16, 2020

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events