[NFC][workflow] Fix issue where the workflow would say all PR's already exists
authorTobias Hieta <tobias@hieta.se>
Thu, 2 Jun 2022 06:20:21 +0000 (08:20 +0200)
committerTobias Hieta <tobias@hieta.se>
Thu, 2 Jun 2022 06:20:21 +0000 (08:20 +0200)
llvm/utils/git/github-automation.py

index e094fe8..a868429 100755 (executable)
@@ -193,7 +193,7 @@ class ReleaseWorkflow:
 
     def check_if_pull_request_exists(self, repo:github.Repository.Repository, head:str) -> bool:
         pulls = repo.get_pulls(head=head)
-        return pulls != None
+        return pulls.totalCount != 0
 
     def create_pull_request(self, owner:str, branch:str) -> bool:
         """