-
-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support coverage reports on external PRs #2087
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Coverage report
Test suite run success1165 tests passing in 193 suites. Report generated by 🧪jest coverage report action from b731e5b |
Coverage report
Test suite run success1170 tests passing in 194 suites. Report generated by 🧪jest coverage report action from 280a941 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but I'm wondering whether secrets.GITHUB_TOKEN
will work or not. The docs mention that the default uses github.token
(whatever that is) and the example it has does not specify the token. Any reason why we need the secret token? If not, maybe we could try and remove it?
Here we managed to reproduce the issue: #2089 (comment) because I've opened this from an external repository |
It seems to be equivalent to the githhub-token from the context: https://stackoverflow.com/questions/66899758/difference-between-github-token-vs-secrets-github-token Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
…fork-prs-in-build
…-build' into 2-261/handle-externalfork-prs-in-build
This reverts commit 7792817.
This reverts commit de7ac4f.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one! So what's the current state? Will the coverage report run on external PRs or not? Does it still fail? The action readme says:
Error: Resource not accessible by integration
This message means the requester does not have enough permission. If secrets.GITHUB_TOKEN is explicitly passed, this problem can be solved by just removing it.
But we're not passing it anyway 🤔 This issue also has a number of suggestions, which may or may not work and may or may not be worth it.
@thomasheartman we tried fixing this in multiple ways with @gardleopard using another repo (https://github.com/gastonfournier/test-pr-comment) to speed up the feedback loop and after some attempts, we're removing the comment. We can look into this later with more time |
About the changes
External PRs fail when trying to upload coverage reports (example). As explained in this documentation https://github.com/ArtiomTr/jest-coverage-report-action#outputs
which is our case.
With this change, external PRs should be able to post the coverage report as a comment in the PR