From a3269f2871a54474cd4aa8732a6be527ab1e0523 Mon Sep 17 00:00:00 2001 From: Winston Purnomo Date: Thu, 16 May 2024 14:45:16 -0700 Subject: [PATCH] added && clause to allow 200 on getlink when using install token --- github/repos_contents.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/repos_contents.go b/github/repos_contents.go index 9539a5c4296..c4453739f9c 100644 --- a/github/repos_contents.go +++ b/github/repos_contents.go @@ -346,7 +346,7 @@ func (s *RepositoriesService) GetArchiveLink(ctx context.Context, owner, repo st } defer resp.Body.Close() - if resp.StatusCode != http.StatusFound { + if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusFound { return nil, newResponse(resp), fmt.Errorf("unexpected status code: %s", resp.Status) }