Skip to content

Commit 5603b0e

Browse files
sbryngelsonclaude
andcommitted
Post PR comment when coverage cache is auto-updated
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 601277c commit 5603b0e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ jobs:
371371
runs-on: ubuntu-latest
372372
permissions:
373373
contents: write
374+
pull-requests: write
374375
steps:
375376
- name: Clone
376377
uses: actions/checkout@v4
@@ -384,15 +385,26 @@ jobs:
384385
path: toolchain/mfc/test
385386

386387
- name: Commit Updated Cache
388+
id: commit
387389
run: |
388390
git config user.name "github-actions[bot]"
389391
git config user.email "github-actions[bot]@users.noreply.github.com"
390392
git add toolchain/mfc/test/test_coverage_cache.json.gz
391393
if git diff --cached --quiet; then
392394
echo "Coverage cache unchanged."
395+
echo "pushed=false" >> "$GITHUB_OUTPUT"
393396
else
394397
git commit -m "Regenerate gcov coverage cache
395398
396399
Automatically rebuilt because cases.py changed."
397400
git push
401+
echo "pushed=true" >> "$GITHUB_OUTPUT"
398402
fi
403+
404+
- name: Post PR Comment
405+
if: steps.commit.outputs.pushed == 'true'
406+
env:
407+
GH_TOKEN: ${{ github.token }}
408+
run: |
409+
gh pr comment ${{ github.event.pull_request.number }} \
410+
--body "Coverage cache auto-updated: a bot commit was pushed to this branch because \`cases.py\` changed."

0 commit comments

Comments
 (0)