0

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?

torek
  • 448,244
  • 59
  • 642
  • 775
riggs22
  • 1
  • 2
  • 1
    the API for listing the commits is `GET /repositories/{workspace}/{repo_slug}/commits/. ` you should verify first by requests module for the URL like `url = "https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/commits" ` – paulyang0125 May 19 '22 at 19:20

0 Answers0