diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-11-21 12:26:43 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-11-21 06:26:43 +0200 |
commit | 10b54df2b2efa539fbaa0bf624e81cb5da99f97a (patch) | |
tree | 24d30bb8fdb9f4396b0bc5212b3a95b6fa09cb93 /routers/routes | |
parent | 420fc8efc24d7a77598307557e5b38077d0efafc (diff) | |
download | gitea-10b54df2b2efa539fbaa0bf624e81cb5da99f97a.tar.gz gitea-10b54df2b2efa539fbaa0bf624e81cb5da99f97a.zip |
Add dingtalk webhook (#2777)
* add dingtalk webhook type
* add vendor
* some fixes
* fix name check
* fix name check & improvment
Diffstat (limited to 'routers/routes')
-rw-r--r-- | routers/routes/routes.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 5a76dddb66..ece2565683 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -396,11 +396,13 @@ func RegisterRoutes(m *macaron.Macaron) { m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost) m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost) m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost) + m.Post("/dingtalk/new", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksNewPost) m.Get("/:id", repo.WebHooksEdit) m.Post("/gitea/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost) m.Post("/gogs/:id", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksEditPost) m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost) m.Post("/discord/:id", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost) + m.Post("/dingtalk/:id", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksEditPost) }) m.Route("/delete", "GET,POST", org.SettingsDelete) @@ -444,12 +446,14 @@ func RegisterRoutes(m *macaron.Macaron) { m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost) m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost) m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost) + m.Post("/dingtalk/new", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksNewPost) m.Get("/:id", repo.WebHooksEdit) m.Post("/:id/test", repo.TestWebhook) m.Post("/gitea/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost) m.Post("/gogs/:id", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost) m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost) m.Post("/discord/:id", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost) + m.Post("/dingtalk/:id", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksEditPost) m.Group("/git", func() { m.Get("", repo.GitHooks) |