From 800d779a21ebc7af02c0a19aba4b12be79e0a8c8 Mon Sep 17 00:00:00 2001 From: Justin Flannery Date: Sat, 23 May 2026 22:40:35 -0600 Subject: [PATCH] ci(test): skip coverage comment on fork PRs The pytest-coverage-comment action fails when run on fork PRs from first-time contributors because GITHUB_TOKEN lacks write access to post PR comments on those events. This causes a false CI failure. Only attempt to post coverage comments on PRs from the main repo (juftin/camply) and skip them for external forks. --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2fc3e61a..e29c84f3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -46,6 +46,6 @@ jobs: install: true github-token: ${{ secrets.GITHUB_TOKEN }} annotations-pytest: ${{ matrix.python == '3.12' && true || false }} - pytest-coverage: ${{ matrix.python == '3.12' && github.event_name == 'pull_request' && true || false }} + pytest-coverage: ${{ matrix.python == '3.12' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'juftin/camply' && true || false }} env: UV_PYTHON: ${{ matrix.python }}