mirror of
https://github.com/harness/drone.git
synced 2025-05-09 06:51:48 +08:00
request github deploymet hooks, but keep disabled by default in UI
This commit is contained in:
parent
13aa6fda3d
commit
0427306f31
@ -4,7 +4,7 @@ const (
|
|||||||
EventPush = "push"
|
EventPush = "push"
|
||||||
EventPull = "pull_request"
|
EventPull = "pull_request"
|
||||||
EventTag = "tag"
|
EventTag = "tag"
|
||||||
EventDeploy = "deploy"
|
EventDeploy = "deployment"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -224,7 +224,7 @@ func DeleteHook(client *github.Client, owner, name, url string) error {
|
|||||||
func CreateHook(client *github.Client, owner, name, url string) (*github.Hook, error) {
|
func CreateHook(client *github.Client, owner, name, url string) (*github.Hook, error) {
|
||||||
var hook = new(github.Hook)
|
var hook = new(github.Hook)
|
||||||
hook.Name = github.String("web")
|
hook.Name = github.String("web")
|
||||||
hook.Events = []string{"push", "pull_request"}
|
hook.Events = []string{"push", "pull_request", "deployment"}
|
||||||
hook.Config = map[string]interface{}{}
|
hook.Config = map[string]interface{}{}
|
||||||
hook.Config["url"] = url
|
hook.Config["url"] = url
|
||||||
hook.Config["content_type"] = "form"
|
hook.Config["content_type"] = "form"
|
||||||
|
Loading…
Reference in New Issue
Block a user