Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ func (t *tfnotify) Run() error {
Title: t.context.String("title"),
Message: t.context.String("message"),
},
CI: ci.URL,
Parser: t.parser,
Template: t.template,
CI: ci.URL,
Parser: t.parser,
Template: t.template,
UseRawOutput: t.config.Terraform.UseRawOutput,
})
if err != nil {
return err
Expand Down
17 changes: 9 additions & 8 deletions notifier/gitlab/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ type Client struct {

// Config is a configuration for GitHub client
type Config struct {
Token string
BaseURL string
NameSpace string
Project string
MR MergeRequest
CI string
Parser terraform.Parser
Template terraform.Template
Token string
BaseURL string
NameSpace string
Project string
MR MergeRequest
CI string
Parser terraform.Parser
Template terraform.Template
UseRawOutput bool
}

// MergeRequest represents GitLab Merge Request metadata
Expand Down
11 changes: 6 additions & 5 deletions notifier/gitlab/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ func (g *NotifyService) Notify(body string) (exit int, err error) {
}

template.SetValue(terraform.CommonTemplate{
Title: cfg.MR.Title,
Message: cfg.MR.Message,
Result: result.Result,
Body: body,
Link: cfg.CI,
Title: cfg.MR.Title,
Message: cfg.MR.Message,
Result: result.Result,
Body: body,
Link: cfg.CI,
UseRawOutput: cfg.UseRawOutput,
})
body, err = template.Execute()
if err != nil {
Expand Down