fix(ci): reuse diagnosis comment per PR instead of per run (#740)

This commit is contained in:
rahim
2026-03-05 11:24:25 -08:00
committed by GitHub
parent e2334a3767
commit 4ae7f41a80
+4 -4
View File
@@ -13,7 +13,7 @@ permissions:
id-token: write
concurrency:
group: ci-diagnosis-${{ github.event.workflow_run.id }}
group: ci-diagnosis-pr-${{ github.event.workflow_run.pull_requests[0].number || github.event.workflow_run.id }}
cancel-in-progress: true
jobs:
@@ -70,13 +70,13 @@ jobs:
5. If the failure is only simple lint/style warnings, keep it brief and generic; do not enumerate every file.
6. Avoid noise:
- Do not post redundant comments.
- Use one comment per CI run.
- If a comment already exists with marker `<!-- ci-diagnosis:run-${{ github.event.workflow_run.id }} -->`, update it instead of creating a new one.
- Use one comment per PR.
- If a comment already exists with marker `<!-- ci-diagnosis:pr-${{ steps.context.outputs.pr_number }} -->`, update it instead of creating a new one.
- Do not include stack traces or long command output in comments.
Post or update a single PR comment on #${{ steps.context.outputs.pr_number }} using this template exactly:
<!-- ci-diagnosis:run-${{ github.event.workflow_run.id }} -->
<!-- ci-diagnosis:pr-${{ steps.context.outputs.pr_number }} -->
### CI Failure Diagnosis
- Run: ${{ github.event.workflow_run.html_url }}
- Commit: `${{ github.event.workflow_run.head_sha }}`