Skip to content

Commit

Permalink
✨ feat(azure): Add Support for new VSTS Identity Provider (#78093)
Browse files Browse the repository at this point in the history
we are introducing a new identity which uses the new Azure DevOps
integration we created. this pr is a temporary shim that we use as we
roll out the new integration, with this logic ultimately becoming the
existing integration.
  • Loading branch information
iamrajjoshi authored Sep 26, 2024
1 parent fb37052 commit baa89e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sentry/identity/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from django.urls import reverse
from django.utils.translation import gettext_lazy as _

from sentry import features
from sentry import features, options
from sentry.models.organization import Organization
from sentry.organizations.services.organization.model import RpcOrganization
from sentry.pipeline import Pipeline, PipelineProvider
Expand Down Expand Up @@ -46,6 +46,9 @@ def get_provider(self, provider_key: str, **kwargs) -> PipelineProvider:
"organizations:migrate-azure-devops-integration", organization
):
provider_key = "vsts_new"
# TODO(iamrajjoshi): Delete this after Azure DevOps migration is complete
if provider_key == "vsts_login" and options.get("vsts.social-auth-migration"):
provider_key = "vsts_login_new"

return super().get_provider(provider_key)

Expand Down
8 changes: 8 additions & 0 deletions src/sentry/options/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,14 @@
register("vsts-limited.client-id", flags=FLAG_PRIORITIZE_DISK | FLAG_AUTOMATOR_MODIFIABLE)
register("vsts-limited.client-secret", flags=FLAG_CREDENTIAL | FLAG_PRIORITIZE_DISK)

# Azure DevOps Integration Social Login Flow
register(
"vsts.social-auth-migration",
default=False,
type=Bool,
flags=FLAG_MODIFIABLE_BOOL | FLAG_AUTOMATOR_MODIFIABLE,
)

# PagerDuty Integration
register("pagerduty.app-id", default="", flags=FLAG_AUTOMATOR_MODIFIABLE)

Expand Down

0 comments on commit baa89e4

Please sign in to comment.