Open abitrolly opened 3 years ago
If you are not signed in, you won't be able to see ahead/behind
I don't see that forkizard
allows to login.
What I meant is that github requires you to login in order to see ahead/behind
So GitHub broke forkizard
?
Looks like it. Also, it's probably against Github policy to scrape this info, might be best to start using Github API.
If GitHub API provides anything, it is buried very deep inside. Maybe GraphQL has something.
Yes, you are absolutely right on this one, documentation is too deep. But, someone managed to dig it up: https://api.github.com/repos/{repoOwner}/{repository}/compare/master...{forkOwner}:master
or in c# using octokit await client.Repository.Commit.Compare(...);
You will need github API key
I started to experiment with it at https://observablehq.com/@abitrolly/github-api-starter-active-forks but didn't get far ahead. The fancy API limit progress ate all my time, so I didn't even started to do the pagination to count forks with owners. Guess I need to parse Link:
headers to know how many pages are there https://docs.github.com/en/rest/guides/traversing-with-pagination and provide manual controls to update the data when hitting API request limits.
Looks like GitHub switched to dynamically updating this info.
When https://github.com/abitrolly/forkizard is open in browser, it shows that the repo is 1 commit ahead, but
curl
andforkizard
only get test that the branch is even,