diff --git a/internal/source/gitea/gitea.go b/internal/source/gitea/gitea.go index 1fb1dac..b39b4bb 100644 --- a/internal/source/gitea/gitea.go +++ b/internal/source/gitea/gitea.go @@ -467,7 +467,7 @@ func (g Gitea) fetchCheckout(ctx context.Context, repo *git.Repository, branch, var headRef *plumbing.Reference - targetBranch, err := repo.Branch(branch) + targetBranch, err := repo.Branch(plumbing.NewBranchReferenceName(branch).String()) if err != nil { g.logger.Error(ctx, "cant get repo branch", err) return nil, nil, err