Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.
×Hi team,
Looking to export repository meta data like pull requests from Bitbucket Cloud. Is there a way >?
Hi @mhumair7 ,
There are list of REST APIs which would help in fetching the pull requests from a bitbucket repository. Please find the below URL that could help you with more details,
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/
Thanks & Regards,
Hema
Hi @Hemalatha Balamurugan . I'm exporting pull requests but is there a cap to it ?
Because it seems all of the pull requests aren't exporting.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @mhumair7 ,
The reason that you are not able to fetch all the pull requests might be because of the pagination while fetching the results. It is max limited to 50 results per page. Try to set dynamic limit in your URL,
int start = 0;
Bitbucket_URL + "/rest/api/1.0/projects/"+PROJECT_KEY+"/repos/"+repository+"/pull-requests?state=MERGED&limit=" + MAX_RESULTS_PER_PAGE + "&start=" + start
once you fetch the results, set the start value to
start += MAX_RESULTS_PER_PAGE
Hope this helps.
Thanks & Regards,
Hema
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.