Skip to content

Commit

Permalink
[Jira] Commits parameter addition for until and since (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
thejosess authored Jul 28, 2023
1 parent 1a5a0a0 commit b2783b4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions atlassian/bitbucket/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2168,6 +2168,8 @@ def get_commits(
avatar_size=None,
avatar_scheme=None,
limit=None,
until=None,
since=None,
):
"""
Get commit list from repo
Expand All @@ -2183,6 +2185,8 @@ def get_commits(
:param avatar_scheme: OPTIONAL: the desired scheme for the avatar URL
:param limit: OPTIONAL: The limit of the number of commits to return, this may be restricted by
fixed system limits. Default by built-in method: None
:param until: OPTIONAL: The commit ID or ref (inclusively) to retrieve commits before
:param since: OPTIONAL: The commit ID or ref (exclusively) to retrieve commits after
:return:
"""
url = self._url_commits(project_key, repository_slug)
Expand All @@ -2203,6 +2207,12 @@ def get_commits(
params["avatarScheme"] = avatar_scheme
if limit:
params["limit"] = limit
if self.cloud and (since or until):
raise Exception("Not supported in Bitbucket Cloud")
if since:
params["since"] = since
if until:
params["until"] = until
return self._get_paged(url, params=params)

def get_commit_changes(self, project_key, repository_slug, hash_newest=None, merges="include", commit_id=None):
Expand Down

0 comments on commit b2783b4

Please sign in to comment.