Skip to content

Commit

Permalink
Limit the Hacktoberfest handler to the home-assistant organisation (#228
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ludeeus authored Dec 19, 2023
1 parent 1fb4f9d commit f767ef5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/bots/src/github-webhook/handlers/hacktoberfest.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { PullRequestClosedEvent, PullRequestOpenedEvent } from '@octokit/webhooks-types';
import { EventType } from '../github-webhook.const';
import { EventType, Organization } from '../github-webhook.const';
import { WebhookContext } from '../github-webhook.model';
import { BaseWebhookHandler } from './base';

export const isHacktoberfestLive = () => new Date().getMonth() === 9;

export class Hacktoberfest extends BaseWebhookHandler {
public allowedEventTypes = [EventType.PULL_REQUEST_OPENED, EventType.PULL_REQUEST_CLOSED];
public allowedOrganizations = [Organization.HOME_ASSISTANT];

async handle(context: WebhookContext<any>) {
if (
Expand Down

0 comments on commit f767ef5

Please sign in to comment.