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

github-token should use token from context as a default fallback #1219

Open
polarathene opened this issue Nov 13, 2024 · 0 comments
Open

github-token should use token from context as a default fallback #1219

polarathene opened this issue Nov 13, 2024 · 0 comments

Comments

@polarathene
Copy link

github-token:
description: GitHub token
required: false

github-token could source the token from context as default. Here's an example of an action doing that.

It's not communicated via action logs or README, but if you attempt to use any features of the action that require the token, they'll silently "fail" by being skipped if that token is missing/empty:

actions-netlify/src/main.ts

Lines 127 to 131 in f242d4c

// Get GitHub token
const githubToken = inputs.githubToken()
if (githubToken === '') {
return
}


Likewise, with permissions being restricted, these features of the action will need specific permissions granted. It'd be worthwhile to document them on the README.

@polarathene polarathene changed the title github-token should use token context as a default fallback github-token should use token from context as a default fallback Nov 13, 2024
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

No branches or pull requests

1 participant