Reputation: 63
I want to get all commit data from all branches via Bitbucket REST api 1.0 like this :
curl -u $id:$password http://$path/rest/api/1.0/projects/$project/repos/$slug/commits
All I get is all commit data from a default branch only, not all branches.
What I want is like this :
curl -u $id:$password http://$path/rest/api/1.0/projects/$project/repos/$slug/commits?branches=all
Of course, it doesn't work. :/
I've already read the official document but I cannot find a clue. https://docs.atlassian.com/bitbucket-server/rest/6.10.1/bitbucket-rest.html#idp205
I guess, getting all branch list, and then searching all commits at each branch can be possible. It seems annoying because I have 200 projects and almost 4,000 repositories.
I need your help. Thank you.
Upvotes: 1
Views: 6417
Reputation: 63
I found out there is currently no single endpoint to return all the commits associated with all branches.
There was a suggestion few years ago but it was rejected by the developers. https://jira.atlassian.com/browse/BSERV-5363
The only way to get all commits across all branches is :
Upvotes: 3