mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 16:30:15 +00:00
Decouple HookTask from Repository (#17940)
At the moment a repository reference is needed for webhooks. With the upcoming package PR we need to send webhooks without a repository reference. For example a package is uploaded to an organization. In theory this enables the usage of webhooks for future user actions. This PR removes the repository id from `HookTask` and changes how the hooks are processed (see `services/webhook/deliver.go`). In a follow up PR I want to remove the usage of the `UniqueQueue´ and replace it with a normal queue because there is no reason to be unique. Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
e828564445
commit
1887c95254
12 changed files with 219 additions and 282 deletions
|
@ -28,7 +28,6 @@ func TestTestHook(t *testing.T) {
|
|||
assert.EqualValues(t, http.StatusNoContent, ctx.Resp.Status())
|
||||
|
||||
unittest.AssertExistsAndLoadBean(t, &webhook.HookTask{
|
||||
RepoID: 1,
|
||||
HookID: 1,
|
||||
}, unittest.Cond("is_delivered=?", false))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue