mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-10-04 01:12:12 +00:00
Update notification.go
fixed nil pointer / panic
This commit is contained in:
parent
f5d82b5dc6
commit
d78ce6dc59
1 changed files with 3 additions and 0 deletions
|
@ -67,6 +67,9 @@ func (n *Notification) Send(context *model.Request) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// send email notifications
|
// send email notifications
|
||||||
|
if n.GitHub == nil {
|
||||||
|
n.GitHub = &github.GitHub{}
|
||||||
|
}
|
||||||
if err := n.GitHub.Send(context); err != nil {
|
if err := n.GitHub.Send(context); err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue