diff --git a/services/bots/src/github-webhook/github-webhook.service.ts b/services/bots/src/github-webhook/github-webhook.service.ts index 62914e8..605a256 100644 --- a/services/bots/src/github-webhook/github-webhook.service.ts +++ b/services/bots/src/github-webhook/github-webhook.service.ts @@ -25,7 +25,8 @@ export class GithubWebhookService { (handler) => (handler.allowBots || !context.senderIsBot) && handler.allowedEventTypes.includes(context.eventType) && - handler.allowedRepositories.includes(context.repositoryName), + (!handler.allowedRepositories.length || + handler.allowedRepositories.includes(context.repositoryName)), ).map((handler) => handler.handle(context)), ); } catch (err) { diff --git a/services/bots/src/github-webhook/handlers/validate-cla.ts b/services/bots/src/github-webhook/handlers/validate-cla.ts index f31ff39..b335e11 100644 --- a/services/bots/src/github-webhook/handlers/validate-cla.ts +++ b/services/bots/src/github-webhook/handlers/validate-cla.ts @@ -37,6 +37,7 @@ const botContextName = 'cla-bot'; @Injectable() export class ValidateCla extends BaseWebhookHandler { + public allowedRepositories = []; public allowedEventTypes = [ EventType.PULL_REQUEST_OPENED, EventType.PULL_REQUEST_REOPENED,