Repository navigation
ci: let the tests comment job check out the repository - #26425
Merged
antobinary merged 1 commit intoNov 6, 2026
Merged
antobinary merged 1 commit into
antobinary merged 1 commit into
Conversation
comment-pr sets its own permissions without contents: read, which removes it from the token. Its first step checks out the repository (for the local check-artifact-exists action), which a public repository allows anyway, but a private one, e.g. a fork, refuses with "Repository not found": the results comment is never posted and the workflow fails on every pull request.
Contributor
|
No actionable comments were generated in the recent review. WalkthroughThe Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Bug fix Suggested reviewers: Merge Risk:
|
✅ Automated tests have passed! |
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.
What does this PR do?
Adds
contents: readto the permissions of thecomment-prjob inautomated-tests-publish-results.yml.Closes Issue(s)
None.
Motivation
comment-prdeclares its own permissions, which removes every one it doesn't list from the token,contentsincluded. Its first step checks out the repository, because the next one uses the localcheck-artifact-existsaction.A public repository allows that checkout anyway, but a private one, such as a private fork, refuses it with
Repository not found. The results comment is then never posted, and the workflow fails on every pull request. The file's other job,publish-test-results, already declarescontents: read.How to test
On a private repository, a job with
comment-pr's permissions failsactions/checkoutwithRepository not found; the same job withcontents: readadded checks out and finds.github/actions/check-artifact-exists.On this repository nothing changes, since public repositories allow the checkout anyway.
More