Skip to content

Commit ef856e6

Browse files
authored
return none when there is no custom domain (#654)
1 parent 8d4a3db commit ef856e6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

backend/analytics_server/mhq/utils/github.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def run(self):
5454

5555

5656
def get_custom_github_domain(org_id: str) -> Optional[str]:
57-
DEFAULT_DOMAIN = "https://api.github.com"
5857
core_repo_service = CoreRepoService()
5958
integrations = core_repo_service.get_org_integrations_for_names(
6059
org_id, [UserIdentityProvider.GITHUB.value]
@@ -70,6 +69,8 @@ def get_custom_github_domain(org_id: str) -> Optional[str]:
7069
LOG.warn(
7170
f"Custom domain not found for intergration for org {org_id} and provider {UserIdentityProvider.GITHUB.value}"
7271
)
73-
return DEFAULT_DOMAIN
72+
# return nothing when custom domain is not found
73+
# this is to prevent the default domain from being used
74+
return
7475

7576
return github_domain

0 commit comments

Comments
 (0)