What i want to do is calculate mean time to approval.
Simply put; how much time it takes for one PR to get approved since it was opened.
Lets say I have 50 projects and in each project has 5 repo. What i am doing right now is:
- Get list of all projects (1 API call)
- Get list of all repo in each project (recursive: 50*5 = 250 API calls)
- Get pull request history for each repo and in each project (recursive: 250)
As you can see there is alot of API calls being made and this will increase my a multiple ratio as repos and projects increases.
My question is:
- Is there a way of getting like whole bitbucket pull request history?
- Is there a way of getting all the repo in all over projects with one call?
- Is there a better way of achieving what i want in some other way?