-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: make env optional, prompt when not set #23
Conversation
} | ||
name := util.GetenvPrompt("GITHUB_USER_NAME") | ||
email := util.GetenvPrompt("GITHUB_USER_EMAIL") | ||
token := util.GetenvPromptSecret("GITHUB_TOKEN", "The token should have the following scopes: ... Please enter the token:") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...
is a TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap, I didn't check what those should be exactly yet.
return fmt.Errorf("GITHUB_TOKEN not set") | ||
} | ||
name := util.GetenvPrompt("GITHUB_USER_NAME") | ||
email := util.GetenvPrompt("GITHUB_USER_EMAIL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should / could we keep the default?
Something like
> GITHUB_USER_EMAIL is not set. Please enter a value (default to "noreply+kuboreleaser@ipfs.tech")
> ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that the default might be a bit misleading. As in, if the user is using kuboreleaser, the commits should be associated with the user. If it's CI (hopefully, in the near future), then we can make sure the env var is set. Does it make sense?
Co-authored-by: Laurent Senta <Laurent.Senta@gmail.com>
This PR addresses feedback from #17. It:
.env
file optional (when a specific secret is not available, the tool will prompt for user input instead of quitting)