Github按合并日期搜索PRS
有什么方法可以通过合并日期在github中找到PR吗? 实际上是在日期范围内合并的PR。
没有找到任何,感觉很奇怪,所以问社区。 谢谢
似乎没有办法按日期查询,通过使用PR GitHub API的PR上的“merge_at”字段日期。
你可以看到像file-suggest_backports-py-L333
(python)这样的脚本是如何执行它以按日期获取和排序PR的。
# Now get all PRs and filter by whether or not they belong to the
# milestone; requesting them all at once is still faster than
# requesting one at a time. This would also be easier if the API
# supported sorting on PR lists
for pr in self.iter_pull_requests(state='closed'):
if (pr['number'] not in milestone_issues or not pr['merged_at']):
continue
merge_commit = self.get_pull_request_merge_commit(pr['number'])
# Ignore commits that were merged before the last tag date
if merge_commit['commit']['committer']['date'] < last_tag_date:
continue
if not self.find_merged_commit(merge_commit,
since=last_tag_date):
yield pr, merge_commit['sha']
但总之,你需要编写脚本: