Skip to content

ref(notification settings): Read team settings#26876

Merged
ceorourke merged 11 commits into
masterfrom
ceorourke/API-1952
Jun 30, 2021
Merged

ref(notification settings): Read team settings#26876
ceorourke merged 11 commits into
masterfrom
ceorourke/API-1952

Conversation

@ceorourke

@ceorourke ceorourke commented Jun 24, 2021

Copy link
Copy Markdown
Member

If a team has notification settings for their projects enabled for Slack, read those settings and notify them when a new issue comes in for one of the team's projects that has an issue alert enabled.

Also add tests to ensure we don't send notifications for projects no longer in the team, and that we do send notifications for new projects added to the team.

This is what a NotificationSetting row looks like for a team Slack notification:

scope_type scope_identifier provider type value target_id
"team" team_id "slack" "issue_alert" "always" team.actor_id

Comment thread src/sentry/integrations/slack/views/link_team.py Outdated
Comment thread src/sentry/notifications/helpers.py Outdated
Comment thread src/sentry/notifications/manager.py Outdated
Comment thread src/sentry/notifications/manager.py Outdated

@mgaeta mgaeta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I left a code block in a comment that you can use to remove the hack.

@ceorourke ceorourke merged commit 90ff942 into master Jun 30, 2021
@ceorourke ceorourke deleted the ceorourke/API-1952 branch June 30, 2021 17:01
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants