Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Commit

Permalink
add check repo
Browse files Browse the repository at this point in the history
  • Loading branch information
cuisongliu committed Apr 19, 2023
1 parent 391346a commit 7da1b3d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pkg/gh/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7da1b3d

Please sign in to comment.