Skip to content

Commit

Permalink
Support status codes 302 and 200 in GetArchiveLink endpoint (#3172)
Browse files Browse the repository at this point in the history
Fixes: #3171.
  • Loading branch information
assembly-winston committed May 16, 2024
1 parent 4b16015 commit 0a8878b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github/repos_contents.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 0a8878b

Please sign in to comment.