1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-07-17 01:42:37 +02:00

fix: github getbranch maxredirects

This commit is contained in:
Carlos Alexandro Becker
2023-10-17 15:52:41 +00:00
parent a00c3db123
commit 91c8db3973

View File

@ -282,7 +282,7 @@ func (c *githubClient) CreateFile(
Info("pushing")
if defBranch != branch && branch != "" {
_, res, err := c.client.Repositories.GetBranch(ctx, repo.Owner, repo.Name, branch, true)
_, res, err := c.client.Repositories.GetBranch(ctx, repo.Owner, repo.Name, branch, 100)
if err != nil && (res == nil || res.StatusCode != 404) {
return fmt.Errorf("could not get branch %q: %w", branch, err)
}