Skip to content

Commit

Permalink
Prevent trailing / being added if top (commit hash) is specified (#1320)
Browse files Browse the repository at this point in the history
Fix for issue #1319
  • Loading branch information
sbgamma authored Feb 3, 2024
1 parent 0e4f6b1 commit 2e232c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion atlassian/bitbucket/cloud/repositories/commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ def each(self, top=None, q=None, sort=None):
params["sort"] = sort
if q is not None:
params["q"] = q
for commit in self._get_paged(top, trailing=True, params=params):
trailing=True
if top is not None:
trailing=False
for commit in self._get_paged(top, trailing=trailing, params=params):
yield self.__get_object(commit)

def get(self, commit_hash):
Expand Down

0 comments on commit 2e232c0

Please sign in to comment.