Skip to content

Commit

Permalink
fix: github getbranch maxredirects
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Oct 17, 2023
1 parent a00c3db commit 91c8db3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/client/github.go
Expand Up @@ -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)
}
Expand Down

0 comments on commit 91c8db3

Please sign in to comment.