Skip to content

Commit

Permalink
Run CLA check handler for all repositories (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Sep 26, 2022
1 parent e1ccabc commit 5b4461b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/bots/src/github-webhook/github-webhook.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions services/bots/src/github-webhook/handlers/validate-cla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5b4461b

Please sign in to comment.