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

Extract GitHub token from file if --github-token or env variable GITHUB_TOKEN is not present #849

Merged
merged 6 commits into from Mar 3, 2023

Conversation

NobodyXu
Copy link
Member

@NobodyXu NobodyXu commented Mar 2, 2023

  • Add option --no-discover-github-token for disabling this behavior
  • Add new dep gh-token v0.1.0 to crates/bin
  • Extract github-token from git-credentials or gh config if --github-token or
    environment variable GITHUB_TOKEN is not present.

Signed-off-by: Jiahao XU Jiahao_XU@outlook.com

@NobodyXu NobodyXu requested a review from passcod March 2, 2023 12:27
@passcod
Copy link
Member

passcod commented Mar 2, 2023

The option is super long, we could do --github-token=false instead

@NobodyXu
Copy link
Member Author

NobodyXu commented Mar 2, 2023

The option is super long, we could do --github-token=false instead

I renamed the option to --no-scrap-github-token, is that accepable?

@passcod
Copy link
Member

passcod commented Mar 2, 2023

"scrap" has the alternative meaning "trash" so that could still be confusing; I'd prefer my proposal, but if opposed, --no-discover-github-token would be fine.

@NobodyXu
Copy link
Member Author

NobodyXu commented Mar 3, 2023

I'd prefer my proposal

While I know that false cannot be a github token, IMO --github-token=false is still confusing so I will go with --no-discover-github-token.

@NobodyXu
Copy link
Member Author

NobodyXu commented Mar 3, 2023

I've renamed the option to --no-discover-github-token.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
if `--github-token` or environment variable `GITHUB_TOKEN` is not
present.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
…ken`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu NobodyXu force-pushed the read-github-token-from-file branch from 27a8da0 to 07dd41c Compare March 3, 2023 02:30
@NobodyXu NobodyXu enabled auto-merge (squash) March 3, 2023 02:30
@NobodyXu NobodyXu merged commit 44ac63c into main Mar 3, 2023
@NobodyXu NobodyXu deleted the read-github-token-from-file branch March 3, 2023 04:32
@NobodyXu NobodyXu linked an issue Mar 3, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Read GitHub token from file
2 participants