Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在github中查找最新版本的日期_Github_Github Api - Fatal编程技术网

在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中特定存储库的最新版本,然后显示自该版本创建以来的提交

我知道我可以通过以下方式获得提交:

我希望在最新版本的日期发布
,这样我就可以使用它创建对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不支持在此结果集列表上排序

是否有其他方法可以获取最近发布的日期