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