在github中查找最新版本的日期
我正在尝试编写一个脚本,该脚本将获取github中特定存储库的最新版本,然后显示自该版本创建以来的提交 我知道我可以通过以下方式获得提交: 我希望在最新版本的日期发布在github中查找最新版本的日期,github,github-api,Github,Github Api,我正在尝试编写一个脚本,该脚本将获取github中特定存储库的最新版本,然后显示自该版本创建以来的提交 我知道我可以通过以下方式获得提交: 我希望在最新版本的日期发布,这样我就可以使用它创建对github API的请求,如下所示: curl https://api.github.com/repos/RepoOwner/MyRepo/commits?since=2015-01-01T00:00:00Z 卷曲https://api.github.com/repos/RepoOwner/MyRepo
,这样我就可以使用它创建对github API的请求,如下所示:
curl https://api.github.com/repos/RepoOwner/MyRepo/commits?since=2015-01-01T00:00:00Z
卷曲https://api.github.com/repos/RepoOwner/MyRepo/commits?since=2015-01-01T00:00:00Z
其中,2015-01-01T00:00:00Z
恰好是在最新发布日期发布的。我知道我可以得到如下发布列表:
curl https://api.github.com/repos/RepoOwner/MyRepo/commits?since=2015-01-01T00:00:00Z
我的计划是按日期降序获得发布列表,然后检查第一个列表以确定发布日期。但分类似乎不起作用。指定结果应按sort=published\u在
处进行排序,并且asc
或desc
对于顺序
似乎具有相同的结果(https://api.github.com/repos/ReporOwner/myrepo/releases?sort=published_at&order=desc
vs.https://api.github.com/repos/ReporOwner/myrepo/releases?sort=published_at&order=asc
)。我猜github API不支持在此结果集列表上排序
是否有其他方法可以获取最近发布的日期