Quantcast
Channel: Finding the oldest commit in a GitHub repository via the API - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Answer by fregante for Finding the oldest commit in a GitHub repository via the API

$
0
0

This isn't via API, but on GitHub.com: if you have the latest commit SHA and the commit count, you can build the URL to find it:

https://github.com/USER/REPO/commits?after=LAST_COMMIT_SHA+COMMIT_COUNT_MINUS_2# Example. Commit count in this case was 1573https://github.com/sindresorhus/refined-github/commits/master  ?after=a76ed868a84cd0078d8423999faaba7380b0df1b+1571

Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>