Search code examples
gitbitbucketbamboobitbucket-server

list git/stash pull requests for branch


I am working on a full Atlassian suite, jira stash/git and bamboo.

Does anyone know if there a way to list the PR's for my current branch?

I need to get find out from shell if my current branch has an open PR and find it's ID if one exists. No need to create a pr, as this will be done by the dev. Any suggestions are welcome.


Solution

  • You can use Stash' (or Bitbucket's) REST API to get information about the pullrequests for a repository:

    That way you can implement your own script (bash with curl, java, groovy, python, ...) to get the info you need.

    General info about the REST APIs is available here.