GhApiClient: Fallback to unauthorized mode if auth token is invalid (#1121)

Fixed #850

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-06-04 12:29:42 +10:00 committed by GitHub
parent 351b9d074a
commit 2acba14b41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 61 additions and 35 deletions

View file

@ -83,7 +83,7 @@ pub(super) enum FetchReleaseRet {
/// Returns 404 if not found
pub(super) async fn fetch_release_artifacts(
client: &remote::Client,
GhRelease { owner, repo, tag }: GhRelease,
GhRelease { owner, repo, tag }: &GhRelease,
auth_token: Option<&str>,
) -> Result<FetchReleaseRet, GhApiError> {
let mut request_builder = client