mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-04 18:27:58 +02:00
[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 (cherry picked from commitcbdea868e4
) (cherry picked from commit6cd150483b
)
This commit is contained in:
parent
84fdead902
commit
47246da8d3
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