我们有一个被弃用的Bitbucket实例,我想拉取存储库仍在积极提交的数据。现在,我使用/repos
端点,然后遍历该端点并为每个端点调用/projects/foo/repos/bar/commits?limit=1
,这非常慢(运行几千个repos需要几个小时)。
有没有更有效的API端点可以用来查找repos或最近提交的整个项目?
发布于 2019-11-29 16:24:26
如果您只想获取每个分支的最新提交,可以尝试这种方式:
https://api.bitbucket.org/2.0/repositories/{username}/{repo_slug}/refs/branches
或从特定分支:
https://api.bitbucket.org/2.0/repositories/{username}/{repo_slug}/refs/branches/{name}
希望能对你有所帮助。:)
https://stackoverflow.com/questions/56120556
复制相似问题