我想在github REST api中获取单独文件的所有提交消息.但我得到的只是 - 只获得所有提交单独的分支.然后我试着得到以下:
http://api.github.com/users/<username>/<project>/commits/<branch>/<path/to/file>
Run Code Online (Sandbox Code Playgroud)
但这也没有帮助.这至少是可能的吗?
我正在寻找获取提交的作者/贡献者的方法。我对 github-api 真的很陌生,这给我带来的麻烦比我想象的要多。
问题描述
如果我有这样的文件的 URL ,是否有 github API 可以向我显示已提交该文件的贡献者列表?
或者,我是否需要使用多个 API 调用的结果(例如)
I'm thinking of cross-referencing the outputs of those two^ if everything else fails.
这应该返回 Pratik855
我找到了这个答案,但这并不是我想要的。虽然满足了所有要求,但我不确定如何https://api.github.com/repos/csitauthority/csitauthority.github.io/commits?=README
转换为https://api.github.com/repos/csitauthority/csitauthority.github.io/commits?=HUGO/content/page/vlan-101.md
基于https://github.com/csitauthority/CSITauthority.github.io/blob/master/HUGO/content/post/vlan-101.md
,因为 HUGO 只能生成第三种规范 URL。