Skip to content

Commit

Permalink
Fix list index out of range on backport.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziomello committed Oct 7, 2024
1 parent d0d78d2 commit 65cfb55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/backport.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def should_backport_by_labels(number, title, labels):
pygithub_commit = source_repo.get_commit(sha=commit_sha)

pulls = pygithub_commit.get_pulls()
if not pulls:
if not pulls or pulls.totalCount == 0:
print(f"{commit_sha[:9]} '{commit_title}' does not belong to a PR.")
continue

Expand Down

0 comments on commit 65cfb55

Please sign in to comment.