Repository navigation
Conversation
The lcov report step posts a PR comment using GITHUB_TOKEN, which is read-only for pull requests from forks, so every fork PR failed with 'Resource not accessible by integration' even when lint and tests passed. The action skips commenting when no token is given, so pass the token only for same-repository branches. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
Author
|
Closing for now. The PRs this was blocking have been reopened from branches in this repository, so they no longer hit the read-only token limitation. The underlying problem still applies to pull requests from forks: the coverage comment step fails with "Resource not accessible by integration" even when lint and tests pass. This change can be reopened if that becomes a nuisance for outside contributors. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every pull request opened from a fork currently fails CI at the "Report code coverage" step with
Resource not accessible by integration, even whendart fix, analysis andflutter testall pass. Recent examples: #1167, #1169, #1192, #1193.Cause
zgosalvez/github-actions-report-lcovposts a coverage comment on the PR using thegithub-tokeninput. Forpull_requestevents from forks, GitHub hands the workflow a read-onlyGITHUB_TOKEN, so the comment API call is rejected and the step fails.Fix
The action documents
github-tokenas optional and skips commenting when it is empty. This change passes the token only when the PR head is in this repository:Same-repo branches keep the coverage comment. Fork PRs still run coverage and upload the HTML artifact, they just do not comment.
Once merged, re-running checks on the open fork PRs will pick this up since the run uses the merge commit with
master.🤖 Generated with Claude Code