summaryrefslogtreecommitdiffstats
path: root/modules/auth/repo_form.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-11-21 12:26:43 +0800
committerLauris BH <lauris@nix.lv>2017-11-21 06:26:43 +0200
commit10b54df2b2efa539fbaa0bf624e81cb5da99f97a (patch)
tree24d30bb8fdb9f4396b0bc5212b3a95b6fa09cb93 /modules/auth/repo_form.go
parent420fc8efc24d7a77598307557e5b38077d0efafc (diff)
downloadgitea-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 'modules/auth/repo_form.go')
-rw-r--r--modules/auth/repo_form.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index 6fe826f574..bb917a9114 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -222,6 +222,17 @@ func (f *NewDiscordHookForm) Validate(ctx *macaron.Context, errs binding.Errors)
return validate(errs, ctx.Data, f, ctx.Locale)
}
+// NewDingtalkHookForm form for creating dingtalk hook
+type NewDingtalkHookForm struct {
+ PayloadURL string `binding:"Required;ValidUrl"`
+ WebhookForm
+}
+
+// Validate validates the fields
+func (f *NewDingtalkHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
+ return validate(errs, ctx.Data, f, ctx.Locale)
+}
+
// .___
// | | ______ ________ __ ____
// | |/ ___// ___/ | \_/ __ \