Skip to content

Commit 2e232c0

Browse files
authored
Prevent trailing / being added if top (commit hash) is specified (#1320)
Fix for issue #1319
1 parent 0e4f6b1 commit 2e232c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

atlassian/bitbucket/cloud/repositories/commits.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ def each(self, top=None, q=None, sort=None):
3434
params["sort"] = sort
3535
if q is not None:
3636
params["q"] = q
37-
for commit in self._get_paged(top, trailing=True, params=params):
37+
trailing=True
38+
if top is not None:
39+
trailing=False
40+
for commit in self._get_paged(top, trailing=trailing, params=params):
3841
yield self.__get_object(commit)
3942

4043
def get(self, commit_hash):

0 commit comments

Comments
 (0)