-
Notifications
You must be signed in to change notification settings - Fork 7
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
handle when action triggered on a PR from a fork #6
Comments
You can't add annotations when the PR comes from a fork? |
Unfortunately no. GitHub only gives forks a read only token to make api requests including status checks. |
Bummer. Makes it less useful for Open Source projects. |
Agreed. Actions are still in the early stages so at some point there might be a way to do this. Another bummer is that any secret managed by github is not provided to actions when run from a fork. This is to prevent malicious actors from using the secret (since the fork can modify the action steps that get invoked). |
If you write workflow commands to stdout instead of making web API calls which depend on the token, the authentication issue goes away and the performance may even be better. Example from docs page (https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message):
Both warning and error annotations can be created this way. A GitHub action using this approach: https://github.com/cschleiden/jest-github-actions-reporter |
@jnm2 this is a great idea. I'll see about making this change soon. |
Things to consider:
The text was updated successfully, but these errors were encountered: