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