Skip to content

Commit

Permalink
Merge branch 'master' into dtan4/correct-codeowners
Browse files Browse the repository at this point in the history
  • Loading branch information
dtan4 committed Oct 17, 2018
2 parents c5dadca + a8b8fab commit fca141c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 1 deletion.
14 changes: 14 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func (t *tfnotify) Run() error {
PR: github.PullRequest{
Revision: ci.PR.Revision,
Number: ci.PR.Number,
Title: t.context.String("title"),
Message: t.context.String("message"),
},
CI: ci.URL,
Expand All @@ -84,6 +85,7 @@ func (t *tfnotify) Run() error {
Token: t.config.Notifier.Slack.Token,
Channel: t.config.Notifier.Slack.Channel,
Botname: t.config.Notifier.Slack.Bot,
Title: t.context.String("title"),
Message: t.context.String("message"),
CI: ci.URL,
Parser: t.parser,
Expand Down Expand Up @@ -122,6 +124,10 @@ func main() {
Usage: "Parse stdin as a fmt result",
Action: cmdFmt,
Flags: []cli.Flag{
cli.StringFlag{
Name: "title, t",
Usage: "Specify the title to use for notification",
},
cli.StringFlag{
Name: "message, m",
Usage: "Specify the message to use for notification",
Expand All @@ -133,6 +139,10 @@ func main() {
Usage: "Parse stdin as a plan result",
Action: cmdPlan,
Flags: []cli.Flag{
cli.StringFlag{
Name: "title, t",
Usage: "Specify the title to use for notification",
},
cli.StringFlag{
Name: "message, m",
Usage: "Specify the message to use for notification",
Expand All @@ -144,6 +154,10 @@ func main() {
Usage: "Parse stdin as a apply result",
Action: cmdApply,
Flags: []cli.Flag{
cli.StringFlag{
Name: "title, t",
Usage: "Specify the title to use for notification",
},
cli.StringFlag{
Name: "message, m",
Usage: "Specify the message to use for notification",
Expand Down
2 changes: 1 addition & 1 deletion misc/scripts/install-devel-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go get -v -u github.com/Songmu/ghch/cmd/ghch
go get -v -u github.com/Songmu/goxz/cmd/goxz
go get -v -u github.com/git-chglog/git-chglog/cmd/git-chglog
go get -v -u github.com/golang/dep/cmd/dep
go get -v -u github.com/golang/lint/golint
go get -v -u golang.org/x/lint/golint
go get -v -u github.com/haya14busa/goverage
go get -v -u github.com/haya14busa/reviewdog/cmd/reviewdog
go get -v -u github.com/motemen/gobump/cmd/gobump
Expand Down
1 change: 1 addition & 0 deletions notifier/github/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type Config struct {
// PullRequest represents GitHub Pull Request metadata
type PullRequest struct {
Revision string
Title string
Message string
Number int
}
Expand Down
1 change: 1 addition & 0 deletions notifier/github/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func (g *NotifyService) Notify(body string) (exit int, err error) {
}

template.SetValue(terraform.CommonTemplate{
Title: cfg.PR.Title,
Message: cfg.PR.Message,
Result: result.Result,
Body: body,
Expand Down
1 change: 1 addition & 0 deletions notifier/slack/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type Config struct {
Token string
Channel string
Botname string
Title string
Message string
CI string
Parser terraform.Parser
Expand Down
1 change: 1 addition & 0 deletions notifier/slack/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func (s *NotifyService) Notify(body string) (exit int, err error) {
}

template.SetValue(terraform.CommonTemplate{
Title: cfg.Title,
Message: cfg.Message,
Result: result.Result,
Body: body,
Expand Down

0 comments on commit fca141c

Please sign in to comment.