mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Add user webhooks (#21563)
Currently we can add webhooks for organizations but not for users. This PR adds the latter. You can access it from the current users settings. 
This commit is contained in:
@ -223,12 +223,8 @@ func CreateHook(ctx *context.APIContext) {
|
||||
// responses:
|
||||
// "201":
|
||||
// "$ref": "#/responses/Hook"
|
||||
form := web.GetForm(ctx).(*api.CreateHookOption)
|
||||
|
||||
if !utils.CheckCreateHookOption(ctx, form) {
|
||||
return
|
||||
}
|
||||
utils.AddRepoHook(ctx, form)
|
||||
utils.AddRepoHook(ctx, web.GetForm(ctx).(*api.CreateHookOption))
|
||||
}
|
||||
|
||||
// EditHook modify a hook of a repository
|
||||
|
Reference in New Issue
Block a user