New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple HookTask from Repository #17940
Conversation
How about to add a new column named |
@KN4CK3R could you please resolve the conflict? |
Please resolve the conflicts |
@KN4CK3R please resolve conflicts |
…-user-org-webhook
Maybe I have posted this concern. When a hook task created from an org/system level webhook, if |
@lunny we do store RepoID in Webhook table: https://github.com/go-gitea/gitea/pull/17940/files#diff-8fd01247d233d732c2e8ffc0c554ad22dde28f35fc7e27f5489d5da39f53c79bR184 |
gitea/models/webhook/webhook.go Line 190 in 716fcfc
|
You don't really understand how webhook and hooktask work. A system/org level webhook's repo_id is always zero. |
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 (seeservices/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.