From 7da1b3d338c1926a7d8f7850ce489d8fdcaaa494 Mon Sep 17 00:00:00 2001 From: cuisongliu Date: Wed, 19 Apr 2023 11:41:01 +0800 Subject: [PATCH] add check repo --- pkg/gh/changelog.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/gh/changelog.go b/pkg/gh/changelog.go index c1619d6..d2c049a 100644 --- a/pkg/gh/changelog.go +++ b/pkg/gh/changelog.go @@ -33,14 +33,18 @@ type SecretShell string var execFn = func(shells []any) error { for _, sh := range shells { if s, ok := sh.(RetryShell); ok { - return retry.RetryOnConflict(retry.DefaultRetry, func() error { + if err := retry.RetryOnConflict(retry.DefaultRetry, func() error { return utils.RunCommand("bash", "-c", string(s)) - }) + }); err != nil { + return err + } } if s, ok := sh.(RetrySecretShell); ok { - return retry.RetryOnConflict(retry.DefaultRetry, func() error { + if err := retry.RetryOnConflict(retry.DefaultRetry, func() error { return utils.RunCommandInSecret(string(s), config.GlobalsConfig.GetToken()) - }) + }); err != nil { + return err + } } if s, ok := sh.(SecretShell); ok { if err := utils.RunCommandInSecret(string(s), config.GlobalsConfig.GetToken()); err != nil {