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 443e64f commit ca0f35e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/job/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (e *MsgExecutor) Execute(ctx context.Context, in executor.ExecuteInput) (ex
}

if strings.TrimSpace(in.Command) == pluginName {
return initialMessages(ctx, envs, e), nil
return initialMessages(ctx, envs, e, in.Context.SlackState), nil
}

msg := fmt.Sprintf("Plain command: %s", in.Command)
Expand Down Expand Up @@ -297,7 +297,7 @@ func getBotkubeJobs(ctx context.Context, envs map[string]string) ([]Job) {
return jobList
}

func initialMessages(ctx context.Context, envs map[string]string, e *MsgExecutor) executor.ExecuteOutput {
func initialMessages(ctx context.Context, envs map[string]string, e *MsgExecutor, slackState *slack.BlockActionStates) executor.ExecuteOutput {
var jobList []api.OptionItem
jobs := getBotkubeJobs(ctx, envs)
for _, job := range jobs {
Expand All @@ -316,7 +316,7 @@ func initialMessages(ctx context.Context, envs map[string]string, e *MsgExecutor
return executor.ExecuteOutput{
Message: api.Message{
BaseBody: api.Body{
Plaintext: "Please select the Job name",
Plaintext: fmt.Sprintf("%s", slackState),
},
Sections: []api.Section{
{
Expand Down

0 comments on commit ca0f35e

Please sign in to comment.