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

use github.token internally to avoid the need to pass in github_token input #20

Closed
activescott opened this issue Jan 28, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@activescott
Copy link
Owner

activescott commented Jan 28, 2023

Although it says you /can/ do this in the docs and in the github.context docs and I noticed in examples for actions created by github they don't do it such as this: https://github.com/actions/labeler/blob/main/src/labeler.ts#L16

github.context.token

@activescott activescott added the enhancement New feature or request label Jan 28, 2023
@activescott
Copy link
Owner Author

I tried to do this in #21 by accessing the process.env["GITHUB_TOKEN"] within the action and it wasn't available in the environment like this.

I noticed some actions created by Github did this but those were old versions so maybe it doesn't work anymore?

It's also not in the type definitions of the @actions/github toolkit package for actions so looks like it is entirely unavailable or they're at least discouraging its use this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant