Add replay of webhooks. (#18191)
This commit is contained in:
parent
a38ba634a4
commit
bf7b083cfe
8 changed files with 108 additions and 13 deletions
|
@ -229,3 +229,15 @@ func prepareWebhooks(repo *repo_model.Repository, event webhook_model.HookEventT
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ReplayHookTask replays a webhook task
|
||||
func ReplayHookTask(w *webhook_model.Webhook, uuid string) error {
|
||||
t, err := webhook_model.ReplayHookTask(w.ID, uuid)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
go hookQueue.Add(t.RepoID)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue