[llvm] fde9ef5 - [NFC][workflow] Fix issue where the workflow would say all PR's already exists

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 1 23:20:31 PDT 2022


Author: Tobias Hieta
Date: 2022-06-02T08:20:21+02:00
New Revision: fde9ef5214dcc40afbf480e9cce4a3517544ee18

URL: https://github.com/llvm/llvm-project/commit/fde9ef5214dcc40afbf480e9cce4a3517544ee18
DIFF: https://github.com/llvm/llvm-project/commit/fde9ef5214dcc40afbf480e9cce4a3517544ee18.diff

LOG: [NFC][workflow] Fix issue where the workflow would say all PR's already exists

Added: 
    

Modified: 
    llvm/utils/git/github-automation.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index e094fe810f997..a868429083533 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -193,7 +193,7 @@ def create_branch(self, commits:List[str]) -> bool:
 
     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:
         """


        


More information about the llvm-commits mailing list