Trying to fetch all the PRs merged to develop branch using bitbucket api. But it is fetching all the PR of other branches also.
Want to fetch PRs of particular branch say "develop" or "release"
https://api.bitbucket.org/2.0/repositories/<workspace-id>/<repo>/pullrequests/?at=develop
Tried with
https://api.bitbucket.org/2.0/repositories/workspace-id/repo/pullrequests/?
Hi @Abbas Mohammed and welcome to the community!
You can try with a query as follows:
https://api.bitbucket.org/2.0/repositories/workspace-id/repo/pullrequests?q=(destination.branch.name="develop")
Certain characters in the query may need URL encoding, and with URL encoding it will look as follows:
https://api.bitbucket.org/2.0/repositories/workspace-id/repo/pullrequests?q=%28destination.branch.name%3D%22develop%22%29
Does this work for you?
Just a heads up, I removed the workspace id and repo name from your post to protect your privacy.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome, please feel free to reach out if you ever need anything else!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.