refactor: Add jobId hook to BaseTask for deduplicating queued jobs (#13890)

* refactor: Add jobId hook to BaseTask for deduplicating queued jobs

* fix: Drop jobId from APIImportTask, it re-schedules itself while active
This commit is contained in:
Tom Moor authored and GitHub committed 2026-09-25 23:44:16 +00:00
1 parent ed4aaf274d
commit bc992fb22a
15 files changed
+71 -17

No files matched your search

@@ -8,6 +8,13 @@ type Props = {
};
export default class GitHubWebhookTask extends BaseTask<Props> {
protected jobId({ headers }: Props) {
const deliveryId = headers["x-github-delivery"];
return typeof deliveryId === "string"
? `github-webhook:${deliveryId}`
: undefined;
}
public async perform({ headers, payload }: Props): Promise<void> {
const plugins = PluginManager.getHooks(Hook.IssueProvider);
const plugin = plugins.find(