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.

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

Is there a way to export repository metadata like pull requests from Bitbucket cloud ?

mhumair7 July 29, 2024

Hi team, 

Looking to export repository meta data like pull requests from Bitbucket Cloud. Is there a way >?

3 answers

2 votes
Hemalatha Balamurugan July 29, 2024

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

mhumair7 July 31, 2024

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.

1 vote
mhumair7 July 29, 2024

 

@Theodora Boudale Can you suggest something here ?

 

0 votes
Hemalatha Balamurugan September 19, 2024

Hi @mhumair7 ,

Sorry for the delayed response. Has this issue sorted out ?

Thanks & Regards,

Hema

mhumair7 September 23, 2024

Unfortunately not

Hemalatha Balamurugan September 24, 2024

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

Suggest an answer

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

Atlassian Community Events