MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / _get_github_api_url

Function _get_github_api_url

api/integrations/github/views.py:290–299  ·  view source on GitHub ↗

Derive the GitHub API base URL from a repository URL. For github.com: https://api.github.com/ For enterprise: https://{host}/api/v3/

(repository_url: str)

Source from the content-addressed store, hash-verified

288
289
290def _get_github_api_url(repository_url: str) -> str:
291 """Derive the GitHub API base URL from a repository URL.
292
293 For github.com: https://api.github.com/
294 For enterprise: https://{host}/api/v3/
295 """
296 parsed = urlparse(repository_url)
297 if parsed.hostname == "github.com":
298 return "https://api.github.com/"
299 return f"{parsed.scheme}://{parsed.hostname}/api/v3/"
300
301
302@api_view(["POST"])

Callers 1

create_cleanup_issueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…