Export JFROG_CLI_GITHUB_TOKEN env var#288
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
460cefd to
f38951e
Compare
|
I have read the CLA Document and I hereby sign the CLA |
f38951e to
282a03a
Compare
282a03a to
be829f3
Compare
be829f3 to
dd7932d
Compare
dd7932d to
aa57b84
Compare
aa57b84 to
d79018d
Compare
lib/utils.js
Outdated
| let cliConfigCmd = ['config']; | ||
| let cliConfigCmd = []; | ||
| let githubToken = jfrogCredentials.githubToken; | ||
| if (!!githubToken) { |
There was a problem hiding this comment.
why do we have this in both ts and js ?
There was a problem hiding this comment.
actually js is locally compiled from ts, and both of them are added to git. I also was surprised, but it's how it's organized now
d79018d to
d981cf1
Compare
EyalDelarea
left a comment
There was a problem hiding this comment.
Hey,
I know it seems just to pass an extra value to the jf c add command but i do have a few questions.
- I didn't see the param documented in the CLI itself
- There is no docs here or in the CLI what is token used for and what is the purpose of this token.
- What happens if i have multiple GitHub tokens for multiple repos, which they are all connected to one jfrog instance?
- We should check CLI version before adding the extra param and make sure we are backwards compatible
src/utils.ts
Outdated
|
|
||
| public static async configJFrogServers(jfrogCredentials: JfrogCredentials) { | ||
| let cliConfigCmd: string[] = ['config']; | ||
| let cliConfigCmd: string[] = []; |
There was a problem hiding this comment.
It's global flag, relevant not only for configuration.
jf --help
GLOBAL OPTIONS:
--github-token value Github token which is used to call github api
There was a problem hiding this comment.
there is no need to have access to different repos, github call is only used for cli version self-check on github releases, which is public.
There was a problem hiding this comment.
it's backward compatible, updated cli can be used without github token param and old cli can be called with github token param.
There was a problem hiding this comment.
Okay
So if it is not server specific, let's maybe move it to another place so it will be clear.
package.json
Outdated
| { | ||
| "name": "@jfrog/setup-jfrog-cli", | ||
| "version": "4.5.11", | ||
| "version": "4.5.12", |
There was a problem hiding this comment.
This could be done in a separate PR just to bump version before release
d981cf1 to
bd85021
Compare
bd85021 to
409f91e
Compare
| Utils.exportVariableIfNotSet('JFROG_CLI_SOURCECODE_REPOSITORY', process.env.GITHUB_REPOSITORY ?? ''); | ||
| Utils.exportVariableIfNotSet('JFROG_CLI_CI_JOB_ID', process.env.GITHUB_WORKFLOW ?? ''); | ||
| Utils.exportVariableIfNotSet('JFROG_CLI_CI_RUN_ID', process.env.GITHUB_RUN_ID ?? ''); | ||
| Utils.exportVariableIfNotSet('JFROG_CLI_GITHUB_TOKEN', process.env.GITHUB_TOKEN ?? ''); |
JFROG_CLI_GITHUB_TOKEN env var

npm run formatfor formatting the code before submitting the pull request.