Skip to content

Commit 025154d

Browse files
author
Paulo Gomes
authored
Merge pull request #423 from PierreBart/pierrebart/fix-push
Fix fetch error in push branch
2 parents 65e004f + 3c06e94 commit 025154d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/imageupdateautomation_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ func (r *ImageUpdateAutomationReconciler) Reconcile(ctx context.Context, req ctr
308308
// When there's a push spec, the pushed-to branch is where commits
309309
// shall be made
310310

311-
if gitSpec.Push != nil {
311+
if gitSpec.Push != nil && !(ref != nil && ref.Branch == pushBranch) {
312312
// Use the git operations timeout for the repo.
313313
fetchCtx, cancel := context.WithTimeout(ctx, origin.Spec.Timeout.Duration)
314314
defer cancel()

0 commit comments

Comments
 (0)