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']

但总之,你需要编写脚本:

  • 找到合适的分支(比如已经合并到主分支中的分支,或者是因为它们已合并,或者因为它们没有提交:请参阅“如何在git中知道分支是否已经合并到主分支中?”)
  • 在你的本地回购和远程删除它们。 请参阅“如何从本地和远程删除Git分支?”
  • 链接地址: http://www.djcxy.com/p/26063.html

    上一篇: Github search PRS by merge date

    下一篇: git list remote branches, order by number of commits