[llvm] 26e370b - Fix the formatting script: do not try to update a GitHub PR without checking for should_update_gh (#159276)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 26 12:59:06 PDT 2025


Author: Mehdi Amini
Date: 2025-09-26T19:59:03Z
New Revision: 26e370bdbe610dad5c8ef6483386b51392a67ae4

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

LOG: Fix the formatting script: do not try to update a GitHub PR without checking for should_update_gh (#159276)

Added: 
    

Modified: 
    llvm/utils/git/code-format-helper.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/git/code-format-helper.py b/llvm/utils/git/code-format-helper.py
index 7a5311d668f79..6f809c5977c75 100755
--- a/llvm/utils/git/code-format-helper.py
+++ b/llvm/utils/git/code-format-helper.py
@@ -173,7 +173,8 @@ def run(self, changed_files: List[str], args: FormatArgs) -> bool:
                 f":warning: The {self.friendly_name} failed without printing "
                 "a 
diff . Check the logs for stderr output. :warning:"
             )
-            self.update_pr(comment_text, args, create_new=False)
+            if should_update_gh:
+                self.update_pr(comment_text, args, create_new=False)
             return False
 
 


        


More information about the llvm-commits mailing list