Skip to content

Commit 4014ce6

Browse files
committed
fix: keep project-level config backwards-compatible
1 parent ecfae0a commit 4014ce6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

internal/patrol/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,9 @@ func getConfiguration(filename string) (config scanner.ProjectConfig, found bool
2828
log.Warn().Strs("keys", keys).Msg("Found undecoded keys in project configuration")
2929
}
3030

31+
if config.SlackChannel != "" {
32+
config.ReportToSlackChannel = config.SlackChannel
33+
}
34+
3135
return config, true, nil
3236
}

internal/scanner/vulnscanner.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ type AcknowledgedVuln struct {
5151

5252
type ProjectConfig struct {
5353
ReportToSlackChannel string `toml:"report-to-slack-channel"`
54+
SlackChannel string `toml:"slack-channel"` // TODO #27: Break in v1.0. Kept for backwards-compatibility
5455
Acknowledged []AcknowledgedVuln `toml:"acknowledged"`
5556
}
5657

0 commit comments

Comments
 (0)