Skip to content

Commit

Permalink
Refactor gitPush function to handle existing remote branches
Browse files Browse the repository at this point in the history
  • Loading branch information
KacperMalachowski committed Oct 18, 2024
1 parent d326514 commit 04e3182
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/github/bumper/bumper.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ func gitPush(remote, remoteBranch string, repo *git.Repository, auth transport.A
RemoteName: forkRemoteName,
RefSpecs: []config.RefSpec{config.RefSpec(fmt.Sprintf("HEAD:%s", remoteBranch))},
Auth: auth,
}); err != nil {
// Do not fail if the remote branch is already up-to-date
}); err != nil && err != git.NoErrAlreadyUpToDate {
return fmt.Errorf("push to remote: %w", err)
}
} else {
Expand Down

0 comments on commit 04e3182

Please sign in to comment.