-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
add another method to specify github token #1090
Comments
Thank you for your proposal. How about supporting the environment variable |
Thanks for your response!
Sounds great! |
Published a prerelease version v4.8.0-1. https:/suzuki-shunsuke/tfcmt/releases/tag/v4.8.0-1 |
Thank you! |
I confirmed in our private repo and it worked! |
Thank you! |
Feature Overview
We would like to add another method to specify github token to tfcmt.
Currently, it seems tfcmt uses github token only from
GITHUB_TOKEN
environment variable.https:/suzuki-shunsuke/tfcmt/blob/main/pkg/notifier/github/client.go#L74-L84
https:/suzuki-shunsuke/tfcmt/blob/main/pkg/controller/controller.go#L153
https:/suzuki-shunsuke/tfcmt/blob/main/pkg/config/config.go#L22
Since
GitHubToken
is ignored from yaml config, it always gets fromGITHUB_TOKEN
environment variable.Why is the feature needed?
We uses GitHub Provider and it seems it always uses
GITHUB_TOKEN
environment variable to authenticate if env variable exists.https://registry.terraform.io/providers/integrations/github/latest/docs#oauth--personal-access-token
Even if we specify provider using another GitHub App like below, it prioritizes to use env variable and got below error.
provider:
error:
Example Code
same as
Why is the feature needed?
note
No response
The text was updated successfully, but these errors were encountered: