From d118412c2b3acba0effc5ee427e2edeff1b48824 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Mon, 10 Jun 2024 00:24:53 +1000 Subject: [PATCH] Apply suggestions from code review --- crates/binstalk-git-repo-api/src/gh_api_client.rs | 3 +-- .../src/gh_api_client/release_artifacts.rs | 2 +- e2e-tests/private-github-repo.sh | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/binstalk-git-repo-api/src/gh_api_client.rs b/crates/binstalk-git-repo-api/src/gh_api_client.rs index c0a5f700..256d0114 100644 --- a/crates/binstalk-git-repo-api/src/gh_api_client.rs +++ b/crates/binstalk-git-repo-api/src/gh_api_client.rs @@ -258,7 +258,6 @@ impl GhApiClient { .await { Ok(artifacts) => { - debug!("artifacts = {artifacts:?}"); Ok(Some(artifacts)) } Err(GhApiError::NotFound) => Ok(None), @@ -556,7 +555,7 @@ mod test { )); } - if client.get_auth_token().is_some() { + if client.has_auth_token() { for repo in PRIVATE_REPOS { let client = client.clone(); diff --git a/crates/binstalk-git-repo-api/src/gh_api_client/release_artifacts.rs b/crates/binstalk-git-repo-api/src/gh_api_client/release_artifacts.rs index 774f682a..c561e4ae 100644 --- a/crates/binstalk-git-repo-api/src/gh_api_client/release_artifacts.rs +++ b/crates/binstalk-git-repo-api/src/gh_api_client/release_artifacts.rs @@ -78,7 +78,7 @@ pub(super) fn fetch_release_artifacts_restful_api( client, &[ "repos", owner, repo, "releases", "tags", - tag, //&percent_encode_http_url_path(tag).to_compact_string(), + tag, ], ) } diff --git a/e2e-tests/private-github-repo.sh b/e2e-tests/private-github-repo.sh index a2ba6a76..e0050101 100755 --- a/e2e-tests/private-github-repo.sh +++ b/e2e-tests/private-github-repo.sh @@ -10,7 +10,7 @@ export PATH="$CARGO_HOME/bin:$PATH" # Install binaries using `--manifest-path` # Also test default github template -"./$1" binstall --force --manifest-path "manifests/private-github-repo-test-Cargo.toml" --no-confirm cargo-binstall --strategies crate-meta-data --log-level debug +"./$1" binstall --force --manifest-path "manifests/private-github-repo-test-Cargo.toml" --no-confirm cargo-binstall --strategies crate-meta-data # Test that the installed binaries can be run cargo binstall --help >/dev/null