Not working
That's odd. Here it fails some of the times, but usually works. Might this be an API rate limiting issue?
I'm not proficient at JavaScript programming and the functional nature of the code makes I have no idea how to debug it (that's my lack of knowledge; any hints on debugging the code are much welcomed).
@TechMorgan do you remember the repositories on which it fails?
What happens if you replace the curly parameters https://api.github.com/repos/{owner}/{repo}/commits with the actual values?
For instance for https://github.com/FarhadG/init into https://api.github.com/repos/FarhadG/init/commits
@jpluimers I just checked the bookmarklet and it worked. I think it only fails sometimes. This script doesn't work on private repos.
@jpluimers I just checked the bookmarklet and it worked. I think it only fails sometimes. This script doesn't work on private repos.
The "doesn't work on private repos" is likely because of the Git API usage (it does plain access without an API key).
Could you please add this limitation to the README.md then issue a pull request for that README change?
The INIT bookmarklet uses the link response header of the commits endpoint which looks like link: <https://api.github.com/repositories/205423/commits?sha=&page=2>; rel="next", <https://api.github.com/repositories/205423/commits?sha=&page=1139>; rel="last"
Maybe the GitHub API behaves abnormally when it fails. (via)