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

Unexpected Pull Request Results for Branches with Prefix/Suffix

Jyoti Varade November 27, 2024

 

I am trying to fetch the merged pull request details of the StageDeploy branch, but it's also returning the PRs for the prefix and suffix branches, such as devStageDeploy and StageDeploytest, which I don't want.

https://api.bitbucket.org/2.0/repositories/your_workspace/your_repository/pull-requests/?state=MERGED&at=StageDeploy&page=2

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2024

Hello @Jyoti Varade ,

thanks for reaching out!

Checking your example API call, I think the filtering syntax used is slightly incorrect, so that's likely why you are not seeing the results you were expecting.

If you want to filter all the MERGED pull requests with the destination branch named StageDeploy, the following endpoint can be used : 

https://api.bitbucket.org/2.0/repositories/WORKSPACE/REPOSITORY/pullrequests/?q=destination.branch.name%3DStageDeploy'

Where %3D is the encoded value of "=" (equal sign).

Could you try using the filtering as in the example above and let us know how it goes?

Thank you, @Jyoti Varade !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events