Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hirenko-v committed Sep 30, 2024
1 parent 11b7216 commit b7b5c97
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/snippet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"gopkg.in/yaml.v2"
)

// Define the structure of your YAML file
type Config struct {
ChannelID string `yaml:"channelID,omitempty"`
Communications struct {
DefaultGroup struct {
SocketSlack struct {
Expand All @@ -35,8 +35,6 @@ type Config struct {
}

const (
channelID = "C07MUPT2QRE"
message = "Output:"
configPath = "/config/comm_config.yaml"
)

Expand Down Expand Up @@ -199,10 +197,13 @@ func (SnippetExecutor) Execute(ctx context.Context, in executor.ExecuteInput) (e
return executor.ExecuteOutput{}, err
}

botToken, err := getBotToken()
var cfg Config
err = plugin.MergeExecutorConfigs(in.Configs, &cfg)
if err != nil {
return executor.ExecuteOutput{}, err
}
channelID := cfg.ChannelID
botToken, err := getBotToken()

// Step 1: Execute the command
content, err := executeCommand(ctx, cmd, in.Context.KubeConfig)
Expand Down

0 comments on commit b7b5c97

Please sign in to comment.