I am looking for ways to fetch the author/contributor of a commit. I'm really new to github-api and this is giving me more trouble than I imagined.
We're starting with..
- I have the list of contributors
- I can filter the commits by contributor on the github website with
?author=
like this - It is possible to see contributor in file commits too
It should be possible
- All of this makes me think it should be possible to find the contributor to a file by API too.
Problem Description
If I have the URL of the file such as this, is there a github API that shows me the list of contributors who have made commits to that file?
Or, Do I need to use results of multiple API calls like(for instance)
I'm thinking of cross-referencing the outputs of those two^ if everything else fails.
Example Output
This should return Pratik855
*EDIT
I found this SO answer but this is not quite what I'm looking for. While all the requirements are made, I'm unsure how https://api.github.com/repos/csitauthority/csitauthority.github.io/commits?=README
translates to https://api.github.com/repos/csitauthority/csitauthority.github.io/commits?=HUGO/content/page/vlan-101.md
based on https://github.com/csitauthority/CSITauthority.github.io/blob/master/HUGO/content/post/vlan-101.md
because HUGO can only generate the 3rd kind of canonical URL.
I am using
- Hugo
- Github pages