Skip to content

Commit 8a7cbdb

Browse files
feat(jira.go) make the debug log idiomatic
Signed-off-by: Holger Waschke <[email protected]>
1 parent 760a567 commit 8a7cbdb

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

notify/jira/jira.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error)
103103
} else {
104104
path = "issue/" + existingIssue.Key
105105
method = http.MethodPut
106-
107-
msg := "updating existing issue"
108-
var disabled []string
109-
if n.conf.Summary.DisableUpdate {
110-
disabled = append(disabled, "summary")
111-
}
112-
if n.conf.Description.DisableUpdate {
113-
disabled = append(disabled, "description")
114-
}
115-
if len(disabled) > 0 {
116-
msg += " without " + strings.Join(disabled, " and ")
117-
}
118-
119-
logger.Debug(msg, "issue_key", existingIssue.Key, "disabled", disabled)
106+
logger.Debug("updating existing issue", "issue_key", existingIssue.Key, "summary_update_disabled", n.conf.Summary.DisableUpdate, "description_update_disabled", n.conf.Description.DisableUpdate)
120107
}
121108

122109
requestBody, err := n.prepareIssueRequestBody(ctx, logger, key.Hash(), tmplTextFunc)

0 commit comments

Comments
 (0)