gpt4 book ai didi

github - github show在特定日期提交

转载 作者:行者123 更新时间:2023-12-03 22:29:42 25 4
gpt4 key购买 nike

我可以像这样在github上的特定分支上显示/搜索提交列表


https://github.com/username/repository/commits/branch_name


我也可以按作者姓名过滤


https://github.com/username/repository/commits/branch_name?author=author_name


但是我正在寻找一种可以在特定日期或日期范围内搜索提交的方法。我试图找到现有答案,但找不到。我也尝试了某些查询,例如before=2016-07-27after=2016-07-27,但它没有用。任何帮助将不胜感激。提前致谢

最佳答案

根据GitHub的list commits on a repository REST API v3文档:

GET /repos/:owner/:repo/commits


包括 sinceuntil参数:

+--------+---------+---------------------------------------------------------------+
| Name | Type | Description |
+--------+---------+---------------------------------------------------------------+
| since | string | Only commits after this date will be returned. |
| | | This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
| until | string | Only commits before this date will be returned. |
| | | This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
+--------+---------+---------------------------------------------------------------+


例如,要选择2018年6月在github / linguist上的master提交: https://github.com/github/linguist/commits/master?since=2018-05-31&until=2018-07-01

根据上面链接的文档,该分支应作为查询参数包括在内,例如 https://github.com/github/linguist/commits?branch=master&since=2018-05-31&until=2018-07-01,但是将分支名称用作路径参数似乎可以正常工作。

关于github - github show在特定日期提交,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38639047/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com