ecosyste-ms / commits

An open API service providing commit metadata for open source projects.
https://commits.ecosyste.ms
GNU Affero General Public License v3.0
3 stars 1 forks source link

Data Question: how is the commit data collected? #470

Closed evamaxfield closed 3 months ago

evamaxfield commented 3 months ago

Hey! This time a question, not a bug!

I am curious how you are counting the commit information? Do you clone the repo and run a set of local git commands to collect everything?

My question here is basically: https://commits.ecosyste.ms/hosts/GitHub/repositories/bioio-devs/bioio

Do this commit information come from the GitHub developer account or from the git config / git history records?

andrew commented 3 months ago

Commit counting is primarily done using a local clone of the git repo, main bulk of the code is here: https://github.com/ecosyste-ms/commits/blob/main/app/models/repository.rb#L127-L251

This works for all git hosts, not just GitHub.

This is some github specific logic for fetching login details over here: https://github.com/ecosyste-ms/commits/blob/main/app/models/repository.rb#L253-L341

evamaxfield commented 3 months ago

Thank you! I have been trying to learn how all the code is organized so both the short explanation is great and the direct links are wonderful for me to start figuring out the repo structures haha.

andrew commented 3 months ago

No problem, feel free to keep asking questions if anything else is unclear