feat(nimbus): Send channel notifications in slack DMs#14179
Merged
yashikakhurana merged 4 commits intomainfrom Dec 16, 2025
Merged
feat(nimbus): Send channel notifications in slack DMs#14179yashikakhurana merged 4 commits intomainfrom
yashikakhurana merged 4 commits intomainfrom
Conversation
jaredlockhart
approved these changes
Dec 11, 2025
Collaborator
jaredlockhart
left a comment
There was a problem hiding this comment.
Yep, simple logic, good test coverage, let's give it a go 🎉 thnx @yashikakhurana 🙏
Comment on lines
18
to
32
| def _lookup_users(client, emails): | ||
| mentions = [] | ||
| user_ids = [] | ||
| for email in emails: | ||
| if not email: | ||
| continue | ||
| try: | ||
| response = client.users_lookupByEmail(email=email) | ||
| mentions.append(f"<@{response['user']['id']}>") | ||
| user_id = response["user"]["id"] | ||
| mentions.append(f"<@{user_id}>") | ||
| user_ids.append(user_id) | ||
| except SlackApiError as e: | ||
| logger.warning(f"Could not find Slack user for {email}: {e}") | ||
| continue | ||
| return " ".join(mentions) | ||
| return " ".join(mentions), user_ids |
Collaborator
There was a problem hiding this comment.
I mean I'd probably keep this function just to lookup and return the user ids and move constructing the mentions elsewhere rather than fold them both into one func
Contributor
Author
There was a problem hiding this comment.
sure i can do that change
Contributor
Author
There was a problem hiding this comment.
okay done!! 🎉
Contributor
Author
|
I am blocking this one as pending on security review (to use updated permissions), once we get the approval will merge this |
Contributor
Author
|
okay another RRA done, got approval from both security and slack app manager, lets merge this now |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 16, 2025
Because - We noticed that if the user is not in the slack channel, tagging user won't notify them This commit - Sends DMs to the users as well referencing the slack channel message - In case it's not able to reference the channel message, it will still send the notification Fixes #14173
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
This commit
Fixes #14173