From b7b5c97facb0a79b71f8933058ba5b7c860f3ca7 Mon Sep 17 00:00:00 2001 From: hirenko-v Date: Mon, 30 Sep 2024 13:09:30 +0300 Subject: [PATCH] test --- cmd/snippet/main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/snippet/main.go b/cmd/snippet/main.go index 94d10eb..2bc0cf1 100644 --- a/cmd/snippet/main.go +++ b/cmd/snippet/main.go @@ -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 { @@ -35,8 +35,6 @@ type Config struct { } const ( - channelID = "C07MUPT2QRE" - message = "Output:" configPath = "/config/comm_config.yaml" ) @@ -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)