add missing error check in CommitFiles (#2605)

* add missing error check in CommitFiles
pull/3545/head
Marko Gaćeša 2024-08-28 12:51:18 +00:00 committed by Harness
parent 55d2b1dee3
commit ffe585f8c4
1 changed files with 3 additions and 0 deletions

View File

@ -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