mirror of
https://github.com/intel/llvm.git
synced 2026-01-27 06:06:34 +08:00
[workflow] Don't add a comment when the first run of the formatter passes (#86335)
This was inadvertently changed in
2120f57410.
This commit is contained in:
2
.github/workflows/pr-code-format.yml
vendored
2
.github/workflows/pr-code-format.yml
vendored
@@ -73,7 +73,9 @@ jobs:
|
||||
# to take advantage of the new --diff_from_common_commit option
|
||||
# explicitly in code-format-helper.py and not have to diff starting at
|
||||
# the merge base.
|
||||
# Create an empty comments file so the pr-write job doesn't fail.
|
||||
run: |
|
||||
echo "[]" > comments &&
|
||||
python ./code-format-tools/llvm/utils/git/code-format-helper.py \
|
||||
--write-comment-to-file \
|
||||
--token ${{ secrets.GITHUB_TOKEN }} \
|
||||
|
||||
@@ -124,7 +124,8 @@ View the diff from {self.name} here.
|
||||
existing_comment = self.find_comment(pr)
|
||||
|
||||
if args.write_comment_to_file:
|
||||
self.comment = {"body": comment_text}
|
||||
if create_new or existing_comment:
|
||||
self.comment = {"body": comment_text}
|
||||
if existing_comment:
|
||||
self.comment["id"] = existing_comment.id
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user