Skip to content

Commit

Permalink
Run BlockingLabels on the synchronize event (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Oct 16, 2024
1 parent ecc765f commit df0061f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/bots/src/github-webhook/handlers/blocking_labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export const LabelsToCheck: {
};

export class BlockingLabels extends BaseWebhookHandler {
public allowedEventTypes = [EventType.PULL_REQUEST_LABELED, EventType.PULL_REQUEST_UNLABELED];
public allowedEventTypes = [
EventType.PULL_REQUEST_LABELED,
EventType.PULL_REQUEST_UNLABELED,
EventType.PULL_REQUEST_SYNCHRONIZE,
];
public allowedRepositories = Object.keys(LabelsToCheck) as Repository[];

async handle(context: WebhookContext<PullRequestLabeledEvent | PullRequestUnlabeledEvent>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ describe('GithubWebhookModule', () => {
{
eventType: EventType.PULL_REQUEST_SYNCHRONIZE,
handlers: [
'BlockingLabels',
'DocsMissing',
'MergeConflictChecker',
'PlatinumReview',
Expand Down

0 comments on commit df0061f

Please sign in to comment.