forked from forgejo/forgejo
[BRANDING] [v1.20] define the forgejo webhook type
templates/swagger/v1_json.tmpl updated with `make generate-swagger` (cherry picked from commit88899c492e
) (cherry picked from commit7171bd9617
) (cherry picked from commit1a742446c1
) (cherry picked from commitd7c189d7b2
) Conflicts: routers/web/web.go
This commit is contained in:
parent
7f96222fb4
commit
cbdea868e4
14 changed files with 127 additions and 12 deletions
|
@ -318,6 +318,7 @@ func RegisterRoutes(m *web.Route) {
|
|||
|
||||
addWebhookAddRoutes := func() {
|
||||
m.Get("/{type}/new", repo.WebhooksNew)
|
||||
m.Post("/forgejo/new", web.Bind(forms.NewWebhookForm{}), repo.ForgejoHooksNewPost)
|
||||
m.Post("/gitea/new", web.Bind(forms.NewWebhookForm{}), repo.GiteaHooksNewPost)
|
||||
m.Post("/gogs/new", web.Bind(forms.NewGogshookForm{}), repo.GogsHooksNewPost)
|
||||
m.Post("/slack/new", web.Bind(forms.NewSlackHookForm{}), repo.SlackHooksNewPost)
|
||||
|
@ -332,6 +333,7 @@ func RegisterRoutes(m *web.Route) {
|
|||
}
|
||||
|
||||
addWebhookEditRoutes := func() {
|
||||
m.Post("/forgejo/{id}", web.Bind(forms.NewWebhookForm{}), repo.ForgejoHooksEditPost)
|
||||
m.Post("/gitea/{id}", web.Bind(forms.NewWebhookForm{}), repo.GiteaHooksEditPost)
|
||||
m.Post("/gogs/{id}", web.Bind(forms.NewGogshookForm{}), repo.GogsHooksEditPost)
|
||||
m.Post("/slack/{id}", web.Bind(forms.NewSlackHookForm{}), repo.SlackHooksEditPost)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue