I hope I don't lead you astray but I'm not actually sure if that's possible from REST. We certainly have to the from/to refs in the core REST API, but that's not quite what you're after?
This might sound a little strange but you _could_ just use Git's smart HTTP ref advertisement instead. This is what Git uses as part of fetch/clone. You can see what I mean by running the following:
GIT_CURL_VERBOSE=1 git ls-remote origin
The environment variable is just so you can see the URL, which looks like:
At that point you could just grep for the hash against refs/pull-requests/$PR/merge-clean.*
Does that help?
* Just FYI in an upcoming version of Stash we're planning on cleaning up some of these refs and merge-clean will most likely become merge. Just so you know.
As one of my colleagues just pointed out, if you're looking for the commit that was actually merged then my previous advice is going to be wrong. merge-clean is an internal ref that will always differ from the final merge commit.
Apologies for the confusion. I can't think of anything that will return the commit hash you're looking for. :(
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs