Skip to content

Commit 55385ef

Browse files
Copilotalexr00
andcommitted
Add bot filtering for merge events
- Check login patterns for merge events to filter out bots - MergedEvent.user is IActor (not IAccount), so we only check name patterns Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent e322622 commit 55385ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/notifications/notificationsManager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@ export class NotificationsManager extends Disposable implements vscode.TreeDataP
362362
}
363363
} else if (event.event === EventType.Merged) {
364364
// Merging a PR is a meaningful event
365-
if (userCheck(event.user.login)) {
365+
// Note: MergedEvent.user is IActor (not IAccount), so we check login patterns
366+
const login = event.user.login;
367+
const isBotByName = login.endsWith('[bot]') || login === 'vs-code-engineering';
368+
if (!isBotByName && userCheck(login)) {
366369
return new Date(event.createdAt);
367370
}
368371
}

0 commit comments

Comments
 (0)