Skip to content

Commit 67b3b01

Browse files
beihailiclaude
andcommitted
fix(ci): grant Lighthouse workflow pull-request write permission
Dependabot PRs get a read-only GITHUB_TOKEN by default, so the `Format Lighthouse results as PR comment` step (using github-script to call createComment) was failing with `Resource not accessible by integration`. deploy.yml already declared the needed permission; lighthouse.yml was missing it, making this step the last hop blocking Dependabot PRs from going green. Also add continue-on-error to the comment step — the Lighthouse score artifact is the primary output; losing the pretty PR summary should not tank the workflow conclusion. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 70f2848 commit 67b3b01

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/lighthouse.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
jobs:
88
lighthouse:
99
runs-on: ubuntu-latest
10+
# Needed by the `Format Lighthouse results as PR comment` step below.
11+
# Without this, Dependabot PRs get a read-only GITHUB_TOKEN and the
12+
# comment call fails with `Resource not accessible by integration`.
13+
permissions:
14+
contents: read
15+
pull-requests: write
1016
steps:
1117
- uses: actions/checkout@v6
1218

@@ -40,6 +46,9 @@ jobs:
4046

4147
- name: Format Lighthouse results as PR comment
4248
if: always()
49+
# Posting the comment is a nice-to-have summary; if token perms
50+
# are ever tightened again, don't fail the whole workflow.
51+
continue-on-error: true
4352
uses: actions/github-script@v8
4453
with:
4554
script: |

0 commit comments

Comments
 (0)