mirror of
https://github.com/outline/outline.git
synced 2025-12-30 15:30:12 -06:00
* Listen to GitHub webhooks to update issue-sources cache * Add `GitHubWebhookTask` * review
24 lines
616 B
TypeScript
24 lines
616 B
TypeScript
import { IssueSource } from "@shared/schema";
|
|
import { IntegrationType, IssueTrackerIntegrationService } from "@shared/types";
|
|
import { Integration } from "@server/models";
|
|
|
|
export abstract class BaseIssueProvider {
|
|
service: IssueTrackerIntegrationService;
|
|
|
|
constructor(service: IssueTrackerIntegrationService) {
|
|
this.service = service;
|
|
}
|
|
|
|
abstract fetchSources(
|
|
integration: Integration<IntegrationType.Embed>
|
|
): Promise<IssueSource[]>;
|
|
|
|
abstract handleWebhook({
|
|
payload,
|
|
headers,
|
|
}: {
|
|
payload: Record<string, unknown>;
|
|
headers: Record<string, unknown>;
|
|
}): Promise<void>;
|
|
}
|