[llvm] [CI] Make Premerge only Comment if Tests Failed (PR #169102)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 14:49:11 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r origin/main...HEAD .ci/premerge_advisor_explain.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- premerge_advisor_explain.py 2025-11-21 22:47:16.000000 +0000
+++ premerge_advisor_explain.py 2025-11-21 22:48:43.012327 +0000
@@ -110,21 +110,23 @@
if advisor_response.status_code == 200:
print(advisor_response.json())
advisor_explanations = advisor_response.json()
else:
print(advisor_response.reason)
- comments.append(get_comment(
+ comments.append(
+ get_comment(
github_token,
pr_number,
generate_test_report_lib.generate_report(
generate_test_report_lib.compute_platform_title(),
return_code,
junit_objects,
ninja_logs,
failure_explanations_list=advisor_explanations,
),
- ))
+ )
+ )
if return_code == 0 and "id" not in comments[0]:
# If the job succeeds and there is not an existing comment, we
# should not write one to reduce noise.
comments = []
with open("comments", "w") as comment_file_handle:
``````````
</details>
https://github.com/llvm/llvm-project/pull/169102
More information about the llvm-commits
mailing list