1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00

forcing github hook as form content_type

This commit is contained in:
Brad Rydzewski 2014-09-06 10:29:06 -07:00
parent 8ad36255de
commit b92ae8b3c7

View File

@ -147,7 +147,7 @@ func CreateHook(client *github.Client, owner, name, url string) (*github.Hook, e
hook.Events = []string{"push", "pull_request"}
hook.Config = map[string]interface{}{}
hook.Config["url"] = url
hook.Config["content_type"] = "json"
hook.Config["content_type"] = "form"
created, _, err := client.Repositories.CreateHook(owner, name, hook)
return created, err
}
@ -162,7 +162,7 @@ func CreateUpdateHook(client *github.Client, owner, name, url string) (*github.H
hook.Events = []string{"push", "pull_request"}
hook.Config = map[string]interface{}{}
hook.Config["url"] = url
hook.Config["content_type"] = "json"
hook.Config["content_type"] = "form"
var updated, _, err = client.Repositories.EditHook(owner, name, *hook.ID, hook)
return updated, err
}