Git Stash 2.9, Jenkins and refs/pull-requests?

What is the right way in Git Stash 2.9 to get the changes associated with a pull-request Id, in order to be able to build them?

We are using Jenkins to retrieve changes from the main repo of our project and select the correct branch to build. Previously we were using the refs/pull-requests/xxx/from, for the branch specifier, but this no longer works. I am looking at the pull-request, but it is not clear if anything in there is giving the branch I should be using?

I don't want to have to clone the repo which the pull-request is sourcing.

Any help would be appreciated.

BTW I should mention the pull-request is being created via the REST API, in case that changes anything.

1 answer

1 accepted

1 vote
Accepted answer

I spoke to a colleague and it turns out that after I create the pull-request in the REST API I need to a GET pull-requests/<pull-request id>/merge to have the merge branch created. Doing a POST on the URL will do the merge to destination branch.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 01, 2018 in Summit

Summit 2019 is going to Las Vegas

You asked we answered - Summit 2019 registration is now open! Can you believe Atlassian Summit hasn’t been to the US since 2017? Now is the time to get ready for an event to remember! Our biggest u...

270 views 5 4
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you