mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-28 03:00:03 +02:00
API endpoint for testing webhook (#3550)
* API endpoint for testing webhook * Empty commit to rerun CI
This commit is contained in:
parent
5a62eb30df
commit
7ea4bfc561
7 changed files with 165 additions and 5 deletions
|
@ -382,9 +382,12 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
m.Group("/hooks", func() {
|
||||
m.Combo("").Get(repo.ListHooks).
|
||||
Post(bind(api.CreateHookOption{}), repo.CreateHook)
|
||||
m.Combo("/:id").Get(repo.GetHook).
|
||||
Patch(bind(api.EditHookOption{}), repo.EditHook).
|
||||
Delete(repo.DeleteHook)
|
||||
m.Group("/:id", func() {
|
||||
m.Combo("").Get(repo.GetHook).
|
||||
Patch(bind(api.EditHookOption{}), repo.EditHook).
|
||||
Delete(repo.DeleteHook)
|
||||
m.Post("/tests", context.RepoRef(), repo.TestHook)
|
||||
})
|
||||
}, reqToken(), reqRepoWriter())
|
||||
m.Group("/collaborators", func() {
|
||||
m.Get("", repo.ListCollaborators)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue