From ffe585f8c42f34d685e98131172f5f15f9154101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Ga=C4=87e=C5=A1a?= Date: Wed, 28 Aug 2024 12:51:18 +0000 Subject: [PATCH] add missing error check in CommitFiles (#2605) * add missing error check in CommitFiles --- git/operations.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git/operations.go b/git/operations.go index ca6aeed08..6071b319c 100644 --- a/git/operations.go +++ b/git/operations.go @@ -144,6 +144,9 @@ func (s *Service) CommitFiles(ctx context.Context, params *CommitFilesParams) (C } refUpdater, err := hook.CreateRefUpdater(s.hookClientFactory, params.EnvVars, repoPath, branchRef) + if err != nil { + return CommitFilesResponse{}, fmt.Errorf("failed to create ref updater: %w", err) + } // run the actions in a shared repo