Fix unit testing

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-05-28 00:17:52 +10:00
parent fd5b78c337
commit 361aca4d8f
No known key found for this signature in database
GPG key ID: 76D1E687CA3C4928
2 changed files with 3 additions and 16 deletions

View file

@ -77,12 +77,8 @@ fn fetch_release_artifacts_restful_api(
issue_restful_api(
client,
&[
"repos",
&percent_encode_http_url_path(owner).to_compact_string(),
&percent_encode_http_url_path(repo).to_compact_string(),
"releases",
"tags",
&percent_encode_http_url_path(tag).to_compact_string(),
"repos", owner, repo, "releases", "tags",
tag, //&percent_encode_http_url_path(tag).to_compact_string(),
],
auth_token,
)

View file

@ -36,16 +36,7 @@ async fn fetch_repo_info_restful_api(
GhRepo { owner, repo }: &GhRepo,
auth_token: Option<&str>,
) -> Result<RepoInfo, GhApiError> {
issue_restful_api(
client,
&[
"repos",
&percent_encode_http_url_path(owner).to_compact_string(),
&percent_encode_http_url_path(repo).to_compact_string(),
],
auth_token,
)
.await
issue_restful_api(client, &["repos", owner, repo], auth_token).await
}
#[derive(Deserialize)]