Skip to content

Commit b2783b4

Browse files
authored
[Jira] Commits parameter addition for until and since (#1207)
1 parent 1a5a0a0 commit b2783b4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

atlassian/bitbucket/__init__.py

+10
Original file line numberDiff line numberDiff line change
@@ -2168,6 +2168,8 @@ def get_commits(
21682168
avatar_size=None,
21692169
avatar_scheme=None,
21702170
limit=None,
2171+
until=None,
2172+
since=None,
21712173
):
21722174
"""
21732175
Get commit list from repo
@@ -2183,6 +2185,8 @@ def get_commits(
21832185
:param avatar_scheme: OPTIONAL: the desired scheme for the avatar URL
21842186
:param limit: OPTIONAL: The limit of the number of commits to return, this may be restricted by
21852187
fixed system limits. Default by built-in method: None
2188+
:param until: OPTIONAL: The commit ID or ref (inclusively) to retrieve commits before
2189+
:param since: OPTIONAL: The commit ID or ref (exclusively) to retrieve commits after
21862190
:return:
21872191
"""
21882192
url = self._url_commits(project_key, repository_slug)
@@ -2203,6 +2207,12 @@ def get_commits(
22032207
params["avatarScheme"] = avatar_scheme
22042208
if limit:
22052209
params["limit"] = limit
2210+
if self.cloud and (since or until):
2211+
raise Exception("Not supported in Bitbucket Cloud")
2212+
if since:
2213+
params["since"] = since
2214+
if until:
2215+
params["until"] = until
22062216
return self._get_paged(url, params=params)
22072217

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

0 commit comments

Comments
 (0)