github-release-notes
github-release-notes copied to clipboard
gren init with token option
When run gren init --token=******
, it doesn't work well.
I got following error log.
Can't find GREN_GITHUB_TOKEN. Please configure your environment
See https://github.com/github-tools/github-release-notes#setup
Can't I use gren init
with token option?
Maybe you are right, gren init
doesn't have this option. My try:
gren init --token=****
error: unknown option `--token'
For another way, just like the error log, you should add the token to ~/.bash_profile
(or ~/.zshrc
).
see https://github.com/github-tools/github-release-notes#setup.
If you've already done it.gren init
is ok.
Yes I know that. If I add environment variable(GREN_GITHUB_TOKEN
), it works well.
Actually, I want to use all gren
command with --token=***
option.
The gren init
is just to create the configuration file, which you can use together with the --token
option.
You should run gren release|changelog --token
instead?
Then, if I don't set GREN_GITHUB_TOKEN
variable, Can't I use gren init
?
You can:
$ gren init
🤖 : Hello, I'm going to ask a couple of questions, to set gren up!
? What type of APIs do you need? Normal
? Where shall I get the informations from? Issues (Time based)
? Do you want to add a prefix to release titles? e.g. v
? Do you want to only include issues/prs that belong to a milestone? No
? Do you want to ignore tags containing certain words? No
? Do you want to group your notes? No
? What file name do you want for your changelog? CHANGELOG.md
? Which extension would you like for your file? .grenrc.yml
Great news! Your .grenrc.yml as been created!
$ cat .grenrc.yml
---
dataSource: "issues"
prefix: ""
onlyMilestones: false
groupBy: false
changelogFilename: "CHANGELOG.md"
And then run
$ gren release --token=xyz
Without
GREN_GITHUB_TOKEN
environment variable, I got error.
Oh! Weird. Bug then 😅
Yes. And also, I think if we can set token value in config file, it would be better to use.
The token
shouldn't be saved in the config
file as could be committed and not secure.