Skip to content
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

feat(notifications): Refactor helpers for notification reads #56064

Merged
merged 7 commits into from
Sep 13, 2023

Conversation

snigdhas
Copy link
Member

Also support querying multiple projects and use RpcUsers for silo code.

This takes changes from #55855 and #55898 which I'll close.

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #56064 (7892392) into master (62e3640) will increase coverage by 0.03%.
Report is 92 commits behind head on master.
The diff coverage is 84.00%.

@@            Coverage Diff             @@
##           master   #56064      +/-   ##
==========================================
+ Coverage   79.95%   79.98%   +0.03%     
==========================================
  Files        5060     5062       +2     
  Lines      217590   217752     +162     
  Branches    36838    36853      +15     
==========================================
+ Hits       173976   174173     +197     
+ Misses      38285    38235      -50     
- Partials     5329     5344      +15     
Files Changed Coverage
...sentry/services/hybrid_cloud/notifications/impl.py ø
src/sentry/notifications/helpers.py 84.00%

return notification_settings
def get_recipient_from_team_or_user(user_id: int | None, team_id: int | None) -> RpcUser | Team:
if user_id is not None:
recipient = RpcUser(id=user_id)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this recipient get any of its other attributes used? You can use user_service.get_user() to fetch the hydrated user record.

@snigdhas snigdhas merged commit d518ad9 into master Sep 13, 2023
51 of 52 checks passed
@snigdhas snigdhas deleted the snigdha/notification-helpers-refac branch September 13, 2023 17:14
@snigdhas snigdhas added this to the Notification Settings 2.0 milestone Sep 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants