【问题标题】:How to use the GitHub Commits API to list the commits (shas) of a deleted branch?如何使用 GitHub Commits API 列出已删除分支的提交 (shas)?
【发布时间】:2021-10-13 13:21:58
【问题描述】:

我正在尝试获取属于已删除的特定 repo 分支的 2 个日期之间的所有提交 shas 的列表。 https://docs.github.com/en/rest/reference/repos#list-commits 不谈论删除的分支。我可以使用的其他 API 不会在流程中恢复分支,这对我也很有用

【问题讨论】:

    标签: rest github-api


    【解决方案1】:

    我发现您还可以将 sha 而不是已删除的分支名称作为“sha”查询参数提供给 Commits API。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-07-14
      • 1970-01-01
      • 2022-11-17
      • 1970-01-01
      • 2015-03-02
      • 1970-01-01
      • 2023-04-03
      • 1970-01-01
      相关资源
      最近更新 更多