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

- 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>
This commit is contained in:
Jiahao XU 2023-03-03 15:32:50 +11:00 committed by GitHub
parent 75289cc2b4
commit 44ac63ce0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 106 additions and 1 deletions

View file

@ -29,6 +29,7 @@ compact_str = "0.7.0"
dirs = "4.0.0"
file-format = { version = "0.14.0", default-features = false }
fs-lock = { version = "0.1.0", path = "../fs-lock" }
gh-token = "0.1.0"
log = { version = "0.4.17", features = ["std"] }
miette = "5.5.0"
mimalloc = { version = "0.1.34", default-features = false, optional = true }