Skip to content

Commit a593423

Browse files
authored
fix(autofix): Fix PR paginated list schenanigans (#2190)
pulls because it's a `PaginatedList` it evaluates to true when empty....
1 parent 37eeb93 commit a593423

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/seer/automation/codebase/repo_client.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,9 @@ def create_pr_from_branch(
682682
description: str,
683683
provided_base: str | None = None,
684684
) -> PullRequest:
685-
if pulls := self.repo.get_pulls(state="open", head=f"{self.repo_owner}:{branch.ref}"):
685+
pulls = self.repo.get_pulls(state="open", head=f"{self.repo_owner}:{branch.ref}")
686+
687+
if pulls.totalCount > 0:
686688
logger.error(
687689
f"Branch {branch.ref} already has an open PR.",
688690
extra={

0 commit comments

Comments
 (0)