【问题标题】:How to get all the statistics for a Github repository using the API?如何使用 API 获取 Github 存储库的所有统计信息?
【发布时间】:2016-03-18 10:22:53
【问题描述】:

我想实现类似git log --stat 使用 Github API 实现的目标。

我想获取存储库中发生的所有提交以及在该特定提交中更改的文件。

我应该如何使用 Github API 执行此操作?

【问题讨论】:

  • 不,不是。 Github 有自己的隐私设置。从技术上讲,它不是远程 git 主机。
  • 安全设置在协议级别实现。 GitHub 作为远程主机没有什么特别之处。

标签: python git api github github-api


【解决方案1】:

首先从https://api.github.com/repos/:owner/:project/commits获取提交

curl -i https://api.github.com/repos/masnun/torrent-tweeter/commits

然后您可以使用提交 API 来获取更改的文件。 https://developer.github.com/v3/repos/commits/#get-a-single-commit

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-09-29
    • 2019-12-11
    • 2020-03-03
    • 2013-12-11
    • 2020-01-07
    • 1970-01-01
    • 1970-01-01
    • 2021-08-29
    相关资源
    最近更新 更多