Skip to content

Commit f22431d

Browse files
committed
Attempt to fix #6 by checking for nil resolution in the returned JIRA issue.
1 parent a5a37d6 commit f22431d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

notify.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ func (r *Receiver) Notify(data *alertmanager.Data) (bool, error) {
5454
log.V(1).Infof("Issue %s for %s is unresolved, nothing to do", issue.Key, issueLabel)
5555
return false, nil
5656
}
57-
if r.conf.WontFixResolution != "" && issue.Fields.Resolution.Name == r.conf.WontFixResolution {
57+
if r.conf.WontFixResolution != "" && issue.Fields.Resolution != nil &&
58+
issue.Fields.Resolution.Name == r.conf.WontFixResolution {
5859
// Issue is resolved as "Won't Fix" or equivalent, log a message just in case.
5960
log.Infof("Issue %s for %s is resolved as %q, not reopening", issue.Key, issueLabel, issue.Fields.Resolution.Name)
6061
return false, nil

0 commit comments

Comments
 (0)