Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Get the open pull request list or details from repo with specific source branch

sai kumar September 24, 2020

I am trying to get the list of open pull requests created from a branch.

I followed the syntax from REST API Documentation but i am getting all pull requests from repo.  

curl -vvv -H "Authorization: Bearer $API_TOKEN" -X GET https://code.server.com/stash/rest/api/1.0/projects/MAPPS/repos/ios-app/pull-requests?direction=outgoing&at=refs/heads/CI/Update-version-in-develop

Expecting Result: Open pull Requests from the branch "CI/Update-version-in-develop" to develop. Usually we are create pull request to develop branch only.

The goal is if pull requests present, delete them and branch CI/Update-version-in-develop. 

 

But getting response like all the open pull requests in the repo.

 

1 answer

1 accepted

0 votes
Answer accepted
sai kumar September 28, 2020

just added the double quotes " curl url. and got the response with pull requests that are open from source branch.

curl -vvv -H "Authorization: Bearer $API_TOKEN" -X GET "https://code.server.com/stash/rest/api/1.0/projects/MAPPS/repos/ios-app/pull-requests?direction=outgoing&at=refs/heads/CI/Update-version-in-develop"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events