diff options
author | Unknwon <u@gogs.io> | 2015-08-29 11:49:59 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-29 11:49:59 +0800 |
commit | 55ddf225bb8aba269a407b1d13ab00a497df4f9b (patch) | |
tree | f8609999ba624a7a9cbb4b9fd00ca2bddde38959 /routers/repo | |
parent | 2f08e9f04880aedd82be24e191198eff700ddc08 (diff) | |
download | gitea-55ddf225bb8aba269a407b1d13ab00a497df4f9b.tar.gz gitea-55ddf225bb8aba269a407b1d13ab00a497df4f9b.zip |
webhook APIs
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/setting.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index fc5e1abc92..0d947ec225 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -396,7 +396,10 @@ func SlackHooksNewPost(ctx *middleware.Context, form auth.NewSlackHookForm) { } meta, err := json.Marshal(&models.SlackMeta{ - Channel: form.Channel, + Channel: form.Channel, + Username: form.Username, + IconURL: form.IconURL, + Color: form.Color, }) if err != nil { ctx.Handle(500, "Marshal", err) @@ -452,7 +455,6 @@ func checkWebhook(ctx *middleware.Context) (*OrgRepoCtx, *models.Webhook) { default: ctx.Data["HookType"] = "gogs" } - w.GetEvent() ctx.Data["History"], err = w.History(1) if err != nil { @@ -530,7 +532,10 @@ func SlackHooksEditPost(ctx *middleware.Context, form auth.NewSlackHookForm) { } meta, err := json.Marshal(&models.SlackMeta{ - Channel: form.Channel, + Channel: form.Channel, + Username: form.Username, + IconURL: form.IconURL, + Color: form.Color, }) if err != nil { ctx.Handle(500, "Marshal", err) |