Hi team, Looking to export repository meta data like pull requests from Bitbucket Cloud. Is there a way >?
@Theodora Boudale Can you suggest something here ?
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.
Sorry for the delayed response. Has this issue sorted out ?
Unfortunately not
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.
It looks like you're new here. Sign in or register to get started.