Retrieve all commits across all branches in repo

jourdanwest
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 7, 2017

I've imported SVN repos to Bitbucket and need to extract author information from all previous commits.

I'm hoping to avoid making an api call for all the branches then another api call for each branch's commits.

What is the easiest way to accomplish this via REST API 1.0 ?

1 answer

0 votes
Jens Schumacher - Released_so
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 31, 2023

Hi @jourdanwest

There is no single API call that will give you all commits across all branches. You will have to loop over all branches to retrieve the commits. 

However you could try to use a git command to get the information instead. For example the following will give you the commit has, followed by the username and email address: 


git log --format="%H %an <%ae>"

 Cheers,
Jens

Jens Schumacher - Released_so
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 31, 2023

Also I just saw that your question was from 2017 🤦‍♂️. Not sure why it popped up on top of my feed. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events