Skip to content

feat(integration): Notify on Disable Email #53533

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

Merged
merged 127 commits into from
Jul 31, 2023

Conversation

chloeho7
Copy link
Contributor

@chloeho7 chloeho7 commented Jul 25, 2023

closes #53567
Milestone 1 of Notify on Disabled Integration project

Implementing email notification when detected broken integrations and disabled.

Disabling and notifying implemented under feature flag "slack-disable-on-broken".

Screenshot 2023-07-28 at 10 49 03 AM

if not provider_type:
return str(organization.absolute_url("/settings/integrations/"))

type_name = provider_types.get(provider_type, "")
Copy link
Member

Choose a reason for hiding this comment

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

Just to be super safe since the fallback is an empty string here, what if we shuffled the logic around like this:

def get_url(organization: Organization, provider_type: str, provider: str) -> str:
    if provider_type:
        type_name = provider_types.get(provider_type, "")
        if type_name:
            return str(
                organization.absolute_url(
                    f"/settings/{type_name}/{provider}/",
                )
            )

    return str(organization.absolute_url("/settings/integrations/"))

This way we account for the possibility of there not being a provider_type and type_name.

@chloeho7 chloeho7 enabled auto-merge (squash) July 31, 2023 17:38
@chloeho7 chloeho7 merged commit 936fa47 into master Jul 31, 2023
@chloeho7 chloeho7 deleted the feat(intergation)-notify-on-disable branch July 31, 2023 18:08
chloeho7 added a commit that referenced this pull request Aug 7, 2023
Fix for #53533
Replace URL for notify when integrations are disabled with:
`/settings/sentry/developer-settings/just-a-test-eb81a3/`
Currently: `/settings/developer-settings/projects/just%20a%20test/`
Part of [Notify on Disabled Integration
project](https://www.notion.so/sentry/Tech-Spec-Notify-on-Disabled-Integration-Spec-e7ea0f86ccd6419cb3e564067cf4a2ef?pvs=4)
chloeho7 added a commit that referenced this pull request Aug 9, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 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.

Notify via email
2 participants