Forums

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

How do you disable the Bitbucket Merge Button via a curl Rest API call ?

erikvdibble December 13, 2019

Hello - I am using Bitbucket Server v6.2.0:

How do you disable the Merge Button via a Rest API call ? 

I'm looking to change this:

{"canMerge": true,"conflicted": false,"outcome": "CLEAN","vetoes": []}

to

{"canMerge": false,"conflicted": false,"outcome": "CLEAN","vetoes": []}

via a curl Rest API POST call.

I tried:

/usr/bin/curl -k -s -w "HTTPSTATUS:%{http_code}" -H "Authorization: Bearer ${MYTOKEN}" -X POST -H "Content-Type: application/json" -d '{"canMerge":false,"conflicted":false,"outcome":"CLEAN","vetoes":[]}' https://${MYURL}/rest/api/1.0/projects/${MYPROJ}/repos/${MYREPO}/pull-requests/139/merge

But I get:

message":"You are attempting to modify a pull request based on out-of-date information.","exceptionName":"com.atlassian.bitbucket.pull.PullRequestOutOfDateException"....

_

Thanks,

Erik

 

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events