chore(Notifications): Refactor notification settings to be per team#10899
Conversation
| })) | ||
| .onConflict((oc) => oc.doNothing()) | ||
| .execute() | ||
| if (service === 'msTeams' || service === 'mattermost') { |
There was a problem hiding this comment.
Previously we inserted this for most integrations, including GitLab and GCal 🤦
...server/postgres/migrations/2025-02-18T17:28:11.536Z_notificationSettingsPerTeamAndChannel.ts
Show resolved
Hide resolved
| version "0.15.0" | ||
| resolved "https://registry.yarnpkg.com/kysely-codegen/-/kysely-codegen-0.15.0.tgz#771c0256c24897ea64d5713dc10e40e8a359b96b" | ||
| integrity sha512-LPta2nQOyoEPDQ3w/Gsplc+2iyZPAsGvtWoS21VzOB0NDQ0B38Xy1gS8WlbGef542Zdw2eLJHxekud9DzVdNRw== | ||
| kysely-codegen@^0.17.0: |
There was a problem hiding this comment.
Previous version would not generate the column type for SlackNotificationEventEnum[] correctly.
6c7e914 to
baf76ce
Compare
Previously although meant to be per team, the settings were still tied to a specific auth object. This meant that 1 team could have different conflicting settings.
baf76ce to
d14bdc7
Compare
It is associated with team and provider, but the client needs it on the integration, so that's where it will live. We also need to make sure that a team only has one active provider for a given integration.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR will be delayed and might be rejected due to its size. |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR will be delayed and might be rejected due to its size. |
There was a problem hiding this comment.
Because I didn't want to introduce new types in legacy GraphQL definitions, I had to update some related types and mutations to SDL first.
Description
Relates to #10685
Previously although meant to be per team, the settings were still tied to a specific auth object. This meant that 1 team could have different conflicting settings.
This should clean up my mess.
Demo
[If possible, please include a screenshot or gif/video, it'll make it easier for reviewers to understand the scope of the changes and how the change is supposed to work. If you're introducing something new or changing the existing patterns, please share a Loom and explain what decisions you've made and under what circumstances]
Testing scenarios
[Please list all the testing scenarios a reviewer has to check before approving the PR]
Scenario A
Scenario B
Final checklist