Skip to content

Commit df0061f

Browse files
authored
Run BlockingLabels on the synchronize event (#278)
1 parent ecc765f commit df0061f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

services/bots/src/github-webhook/handlers/blocking_labels.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ export const LabelsToCheck: {
1515
};
1616

1717
export class BlockingLabels extends BaseWebhookHandler {
18-
public allowedEventTypes = [EventType.PULL_REQUEST_LABELED, EventType.PULL_REQUEST_UNLABELED];
18+
public allowedEventTypes = [
19+
EventType.PULL_REQUEST_LABELED,
20+
EventType.PULL_REQUEST_UNLABELED,
21+
EventType.PULL_REQUEST_SYNCHRONIZE,
22+
];
1923
public allowedRepositories = Object.keys(LabelsToCheck) as Repository[];
2024

2125
async handle(context: WebhookContext<PullRequestLabeledEvent | PullRequestUnlabeledEvent>) {

tests/services/bots/github-webhook/verify_enabled_handlers.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ describe('GithubWebhookModule', () => {
104104
{
105105
eventType: EventType.PULL_REQUEST_SYNCHRONIZE,
106106
handlers: [
107+
'BlockingLabels',
107108
'DocsMissing',
108109
'MergeConflictChecker',
109110
'PlatinumReview',

0 commit comments

Comments
 (0)