-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
select-notifications - Add "Bots" selection
#8859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
select-notifications - Add "Bots" selection
select-notifications - Add "Bots" selection
source/github-helpers/selectors.ts
Outdated
|
|
||
| export const botLinksNotificationSelectors = [ | ||
| // Notification list items with bot avatars | ||
| `.notification-list-item-link a:is(${botAttributes})`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot This isn't selecting anything. The bots can be found in the avatar list. Only select them if the bot is the first in the list (last in DOM). DOM example:
<div class="d-flex flex-row flex-md-row-reverse">
<p class="note m-0 d-md-block d-none color-fg-muted text-right pr-3 flex-shrink-0 notification-list-item-hide-on-hover" style="width: 140px; line-height: 20px;">
<relative-time datetime="2025-11-10T21:12:40Z" class="no-wrap" title="Nov 11, 2025, 4:12 AM GMT+7">Nov 11, 2025</relative-time>
<span class="text-center d-inline-block notification-is-starred-icon color-fg-severe ml-1" style="width:16px">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bookmark v-align-middle">
<path d="M3 2.75C3 1.784 3.784 1 4.75 1h6.5c.966 0 1.75.784 1.75 1.75v11.5a.75.75 0 0 1-1.227.579L8 11.722l-3.773 3.107A.751.751 0 0 1 3 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.91l3.023-2.489a.75.75 0 0 1 .954 0l3.023 2.49V2.75a.25.25 0 0 0-.25-.25Z"></path>
</svg>
</span>
</p>
<div style="width: 70px; min-width: 70px;" class="AvatarStack AvatarStack--three-plus AvatarStack--right mr-0 mr-sm-3 mr-md-0 mr-lg-0 clearfix d-inline-block">
<div class="AvatarStack-body">
<a class="avatar avatar-user" data-hovercard-type="user" data-hovercard-url="/users/grahamlangford/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bro" aria-keyshortcuts="Alt+ArrowUp"><img class=" avatar-user" src="https://avatars.githubusercontent.com/u/3706330?s=40&v=4" width="20" height="20" alt="@bro"></a>
<a class="avatar avatar-user" href="/apps/github-actions"><img src="https://avatars.githubusercontent.com/in/15368?s=40&v=4" width="20" height="20" alt="@github-actions"></a>
<a class="avatar avatar-user" href="/apps/renovate"><img src="https://avatars.githubusercontent.com/in/2740?s=40&v=4" width="20" height="20" alt="@renovate"></a>
</div>
</div>
<span class="f6 flex-self-center ml-2 px-2 flex-shrink-0">manual</span>
</div>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7ea8695. The selector now targets .AvatarStack-body a.avatar:last-child to only select notifications where the bot is the primary author (last in DOM order, first in the avatar list).
Use .AvatarStack-body a.avatar:last-child to select only notifications where the bot is the primary/first author (last in DOM order) Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
select-notifications - Add "Bots" selection

Adds a "Bots" option to the notification filter dropdown, allowing users to select all bot notifications (dependabot, renovate-bot, etc.) at once for bulk actions.
Changes
source/github-helpers/selectors.ts: AddedbotLinksNotificationSelectorsthat matches notifications where a bot is the primary author by targeting.AvatarStack-body a.avatar:last-child(last in DOM order, first in avatar list), reusing existingbotAttributespatternsource/features/select-notifications.tsx: Added "Bots" to Type category dropdown with HubotIconTest URLs
https://github.com/notifications
Screenshot
(Manual testing required - the filter appears in the "Select by" dropdown under Type category alongside Pull requests, Issues, and Others)
Original prompt
handle-bot-notiticationsfeature #5780💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.