diff options
author | PHANI <phani453@gmail.com> | 2018-07-09 04:12:30 -0400 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2018-07-09 16:12:30 +0800 |
commit | 8bbf0293f5f894911bb1df2f0bb80da3bb8c9dcd (patch) | |
tree | ed2b14a84fc2642d5bb6dc913965f639649e56b8 /models | |
parent | 87b229d280def1cd591a9a823b1b2b0bfc8e693e (diff) |
webhook: add headers to support spring config server (#5325)
Spring cloud config server dependency spring cloud config monitor looks for X-Github-Event condition PropertyPathEndpoint.class -> GithubPropertyPathNotificationExtractor.class if ("push".equals(headers.getFirst("X-Github-Event"))) {...}
Diffstat (limited to 'models')
-rw-r--r-- | models/webhook.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/models/webhook.go b/models/webhook.go index 59a1962a..03e8a2a9 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -654,6 +654,8 @@ func (t *HookTask) deliver() { timeout := time.Duration(setting.Webhook.DeliverTimeout) * time.Second req := httplib.Post(t.URL).SetTimeout(timeout, timeout). + Header("X-Github-Delivery", t.UUID). + Header("X-Github-Event", string(t.EventType)). Header("X-Gogs-Delivery", t.UUID). Header("X-Gogs-Signature", t.Signature). Header("X-Gogs-Event", string(t.EventType)). |