Skip to content

Commit

Permalink
fix: only log we change dry-mode run if it differs from server default
Browse files Browse the repository at this point in the history
  • Loading branch information
jippi committed Aug 30, 2024
1 parent c2f21dc commit e2ded69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ func ProcessMR(ctx context.Context, client scm.Client, cfg *config.Config, event
return errors.New("cfg==nil; this is unexpected an error, please report!")
}

// Allow controlling 'dry-run' mode via configuration file
if cfg.DryRun != nil {
// Allow changing the 'dry-run' mode via configuration file
if cfg.DryRun != nil && *cfg.DryRun != state.IsDryRun(ctx) {
slogctx.Info(ctx, "Configuration file has a 'dry_run' value, using that in favor of server default")

ctx = state.WithDryRun(ctx, *cfg.DryRun)
Expand Down

0 comments on commit e2ded69

Please sign in to comment.