You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Add ApiBaseUrl parameter to Set-GitHubConfiguration Feature Request: Add ApiBaseUrl parameter to Set-GitHubConfiguration to support GITHUB_API_URL directly (GitHub Data Residency / ghe.com) #450
Add a new ApiBaseUrl configuration parameter to Set-GitHubConfiguration that accepts a
full API base URL (e.g. directly from $env:GITHUB_API_URL) so that callers do not need to
manually manipulate the URL to extract a bare hostname before configuring the module.
Feature Idea Additional Details
GitHub runners set the GITHUB_API_URL environment variable to the correct API base URL for
the current GitHub instance:
Platform
GITHUB_API_URL
Current PSFG ApiHostName workaround
GitHub.com (GHEC)
https://github.com/proxy/api.github.com/
n/a (default)
GitHub Data Residency (*.ghe.com)
https://api.<tenant>.ghe.com
Strip https://api. → <tenant>.ghe.com
GitHub Enterprise Server (GHES)
https://<hostname>/api/v3
Strip https:// and /api/v3 → <hostname>
This string manipulation is fragile and must be reimplemented by every caller that wants
multi-platform support across all three GitHub deployment types.
This would allow the module to internally derive the correct URL construction strategy,
so callers don't need to understand PSFG's hostname/path conventions.
Notes:
The existing ApiHostName validation already correctly rejects https: and api. prefixes
(via [ValidatePattern('^(?!https?:)(?!api\.)(?!www\.).*')]), so a separate ApiBaseUrl
parameter is the right approach rather than relaxing existing validation.
GitHub Data Residency (*.ghe.com) technically also responds at <tenant>.ghe.com/api/v3,
so ApiHostName can be made to work via string manipulation, but this is an undocumented
implementation detail that callers should not need to rely on.
Activity
feat: Add ApiBaseUrl configuration parameter for direct API URL support