Skip to content

Commit 13b4a13

Browse files
committed
bug fix: host.deploy.slack_channel_id didn't work
1 parent 210c03a commit 13b4a13

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pkg/cmd/deploy.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@ func runDeploy(
7979
"Deploy",
8080
func(ctx context.Context, host config.Host) error {
8181
// Notify to Slack
82-
if err := slackClient.SendText(ctx, host.Deploy.SlackChannel,
82+
if err := slackClient.SendText(ctx, host.Deploy.SlackChannelId,
8383
fmt.Sprintf("*<%s> deploying to %s...*", conf.GitRevision, host.Host)); err != nil {
8484
return err
8585
}
8686
defer func() {
8787
if err != nil {
88-
_ = slackClient.SendText(ctx, host.Deploy.SlackChannel,
88+
_ = slackClient.SendText(ctx, host.Deploy.SlackChannelId,
8989
fmt.Sprintf("*<%s> deploy was failed to %s* :sob:", conf.GitRevision, host.Host))
9090
} else {
91-
_ = slackClient.SendText(ctx, host.Deploy.SlackChannel,
91+
_ = slackClient.SendText(ctx, host.Deploy.SlackChannelId,
9292
fmt.Sprintf("*<%s> deploy was succeeded to %s* :laughing:", conf.GitRevision, host.Host))
9393
}
9494
}()

pkg/config/types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ func (c Host) ListTarget() []DeployTarget {
8181
}
8282

8383
type Deploy struct {
84-
SlackChannel string `yaml:"slack_channel,omitempty"`
85-
PreCommand string `yaml:"pre_command,omitempty"`
86-
PostCommand string `yaml:"post_command,omitempty"`
87-
Targets []DeployTarget `yaml:"targets,omitempty"`
84+
SlackChannelId string `yaml:"slack_channel_id,omitempty"`
85+
PreCommand string `yaml:"pre_command,omitempty"`
86+
PostCommand string `yaml:"post_command,omitempty"`
87+
Targets []DeployTarget `yaml:"targets,omitempty"`
8888
}
8989

9090
type DeployTarget struct {

0 commit comments

Comments
 (0)