使用Python脚本列出所有投入Bitbucket repo的列表

发布于 2025-01-30 10:55:56 字数 519 浏览 2 评论 0原文

我正在尝试弄清楚如何使用Atlassian Python API在给定的时间范围内获取对Bitbucket Cloud存储库的所有提交列表(

​对于BitBucket服务器存储库,而不是Bitbucket云。云功能在从存储库中获得的数据中似乎更加有限。

我当前的代码能够获取有关存储库的一些信息:

from atlassian.bitbucket import Cloud

cloud = Cloud(username='<my username>',
              password='<my auth_password>',
              cloud=True)

repo = cloud.workspaces.get('<workspace>').projects.get('<project_id>').repositories.get('<repo_slug>')
print(repo)

关于我如何打印所有对此仓库的列表的想法?

I am trying to figure out how to get a list of all commits made to a bitbucket cloud repository over a given timeframe using the Atlassian Python API (https://atlassian-python-api.readthedocs.io/index.html)

According to this, there is a get_commits() function, but that only seems to work for a bitbucket server repository, not a bitbucket cloud. The Cloud functions seem significantly more limited in what data I can get from the repository.

My current code is able to pull some information on the repository:

from atlassian.bitbucket import Cloud

cloud = Cloud(username='<my username>',
              password='<my auth_password>',
              cloud=True)

repo = cloud.workspaces.get('<workspace>').projects.get('<project_id>').repositories.get('<repo_slug>')
print(repo)

Any idea on how I could print a list of all commits to this repo?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文