Skip to content

Commit

Permalink
using new config obj
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAngel1196 committed Oct 24, 2023
1 parent 73d5e66 commit 89192d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ type TeamConfig struct {

type Config struct {
Default_slack_channel string
Disable_slack bool
Github_org string
Slack_auth_token string
Github_token string
Expand All @@ -28,6 +27,7 @@ type Config struct {
Severity []SeverityConfig
Ecosystem []EcosystemConfig
Team []TeamConfig
Reporters []string
}

func fileExists(fname string) bool {
Expand Down
2 changes: 1 addition & 1 deletion internal/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func Scan(cmd *cobra.Command, args []string) {
// Load and report out to all configured reporters
reporters := []reporting.Reporter{}

if !cfg.Disable_slack {
if slices.Contains(cfg.Reporters, "slack") {
slackReporter, err := reporting.NewSlackReporter(&cfg)
if err != nil {
log.Error().Err(err).Msg("Failed to create Slack reporter.")
Expand Down

0 comments on commit 89192d2

Please sign in to comment.