Update webhook.go

This commit is contained in:
Brad Rydzewski 2020-01-13 21:51:24 -08:00 committed by GitHub
parent a035dfb0c2
commit 11dbf7cc3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,6 @@ import (
"github.com/drone/drone/core"
"github.com/99designs/httpsignatures-go"
"github.com/sirupsen/logrus"
)
// required http headers
@ -65,21 +64,6 @@ func (s *sender) Send(ctx context.Context, in *core.WebhookData) error {
if s.match(in.Event, in.Action) == false {
return nil
}
logger := logrus.
WithField("event", in.Event).
WithField("action", in.Action)
if in.Repo != nil {
logger = logger.WithField("repo", in.Repo.Name)
}
if in.Build != nil {
logger = logger.
WithField("build.id", in.Build.ID).
WithField("build.number", in.Build.Number).
WithField("build.status", in.Build.Status)
}
logger.Debugln("webhook: sending global webhook")
wrapper := payload{
WebhookData: in,
System: s.System,