【发布时间】:2021-12-01 19:13:39
【问题描述】:
我正在寻找获取提交的作者/贡献者的方法。我对 github-api 真的很陌生,this 给我带来的麻烦比我想象的要多。
我们从……开始。
- 我有list of contributors
- 我可以在 github 网站上使用
?author=过滤贡献者的提交,例如 this - 也可以在文件提交中看到贡献者
应该可以
- 所有这些让我觉得应该也可以通过 API 找到文件的贡献者。
问题描述
如果我有文件 such as this 的 URL,是否有一个 github API 可以显示对该文件进行提交的贡献者列表?
或者,我是否需要使用多个 API 调用的结果,例如(例如)
I'm thinking of cross-referencing the outputs of those two^ if everything else fails.
示例输出
This 应该返回 Pratik855
*编辑
我找到了这个SO answer,但这并不是我想要的。虽然满足了所有要求,但我不确定 https://api.github.com/repos/csitauthority/csitauthority.github.io/commits?=README 如何基于 https://github.com/csitauthority/CSITauthority.github.io/blob/master/HUGO/content/post/vlan-101.md 转换为 https://api.github.com/repos/csitauthority/csitauthority.github.io/commits?=HUGO/content/page/vlan-101.md,因为 HUGO 只能生成第三种规范 URL。
我正在使用
- 雨果
- Github 页面
【问题讨论】:
标签: javascript github-api