Files
outline/plugins/github/server/tasks/GitHubWebhookTask.ts
Tom Moor 85deb8934b Fix GitLab webhook integration updates (#13764)
* fix GitLab webhook integration updates

* support shared GitLab webhook credentials
2026-09-16 22:11:24 -04:00

28 lines
715 B
TypeScript

import { IntegrationService } from "@shared/types";
import { BaseTask } from "@server/queues/tasks/base/BaseTask";
import { Hook, PluginManager } from "@server/utils/PluginManager";
type Props = {
headers: Record<string, unknown>;
payload: Record<string, unknown>;
};
export default class GitHubWebhookTask extends BaseTask<Props> {
public async perform({ headers, payload }: Props): Promise<void> {
const plugins = PluginManager.getHooks(Hook.IssueProvider);
const plugin = plugins.find(
(p) => p.value.service === IntegrationService.GitHub
);
if (!plugin) {
return;
}
await plugin.value.handleWebhook({
headers,
payload,
teamId: null,
});
}
}