Skip to content
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 running in forks #77

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Handle running in forks #77

wants to merge 1 commit into from

Conversation

jsoref
Copy link
Contributor

@jsoref jsoref commented Feb 9, 2024

In a fork, the secret is unlikely to be present.

By making the project-url conditional on the secret, it'll basically never be set in forks (unless you work on octokit and happen to choose to create a secret to use for the purpose of testing -- which is unlikely).

Setting github-token to github.token as a fallback means that the workflow will run in forks w/o triggering ❌ which is slightly better. Eventually users will still disable it because it's annoying, but only once they manage to create a PR or issue in their fork and it runs and tags it...

per octokit/request.js#669 (comment)

In a fork, the secret is unlikely to be present.

By making the project-url conditional on the secret, it'll basically never be set in forks (unless you work on octokit and happen to choose to create a secret to use for the purpose of testing -- which is unlikely).

Setting github-token to `github.token` as a fallback means that the workflow will run in forks w/o triggering ❌ which is slightly better. Eventually users will still disable it because it's annoying, but only once they manage to create a PR or issue in their fork and it runs and tags it...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant