Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Feb 12, 2020
1 parent a21643e commit 9523e28
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/auth/repo_form.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ func (f *NewMSTeamsHookForm) Validate(ctx *macaron.Context, errs binding.Errors)
return validate(errs, ctx.Data, f, ctx.Locale)
}

// NewFeishuHookForm form for creating dingtalk hook
// NewFeishuHookForm form for creating feishu hook
type NewFeishuHookForm struct {
PayloadURL string `binding:"Required;ValidUrl"`
WebhookForm
Expand Down
2 changes: 1 addition & 1 deletion modules/structs/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type CreateHookOptionConfig map[string]string
// CreateHookOption options when create a hook
type CreateHookOption struct {
// required: true
// enum: dingtalk,discord,gitea,gogs,msteams,slack,telegram
// enum: dingtalk,discord,gitea,gogs,msteams,slack,telegram,feishu
Type string `json:"type" binding:"Required"`
// required: true
Config CreateHookOptionConfig `json:"config" binding:"Required"`
Expand Down
4 changes: 2 additions & 2 deletions routers/repo/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm) {
ctx.Redirect(orCtx.Link)
}

// FeishuHooksNewPost response for creating slack hook
// FeishuHooksNewPost response for creating feishu hook
func FeishuHooksNewPost(ctx *context.Context, form auth.NewFeishuHookForm) {
ctx.Data["Title"] = ctx.Tr("repo.settings")
ctx.Data["PageIsSettingsHooks"] = true
Expand Down Expand Up @@ -859,7 +859,7 @@ func MSTeamsHooksEditPost(ctx *context.Context, form auth.NewMSTeamsHookForm) {
ctx.Redirect(fmt.Sprintf("%s/%d", orCtx.Link, w.ID))
}

// FeishuHooksEditPost response for editing MS Teams hook
// FeishuHooksEditPost response for editing feishu hook
func FeishuHooksEditPost(ctx *context.Context, form auth.NewFeishuHookForm) {
ctx.Data["Title"] = ctx.Tr("repo.settings")
ctx.Data["PageIsSettingsHooks"] = true
Expand Down
3 changes: 2 additions & 1 deletion templates/swagger/v1_json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9752,7 +9752,8 @@
"gogs",
"msteams",
"slack",
"telegram"
"telegram",
"feishu"
],
"x-go-name": "Type"
}
Expand Down

0 comments on commit 9523e28

Please sign in to comment.