feat(coderd): refactors github pr sync functionality (#22715)

- Adds `_API_BASE_URL` to `CODER_EXTERNAL_AUTH_CONFIG_`
- Extracts and refactors existing GitHub PR sync logic to new packages
`coderd/gitsync` and `coderd/externalauth/gitprovider`
- Associated wiring and tests

Created using Opus 4.6
This commit is contained in:
Cian Johnston
2026-03-10 18:46:01 +00:00
committed by GitHub
parent cbe46c816e
commit bc27274aba
31 changed files with 4311 additions and 708 deletions
+4
View File
@@ -980,6 +980,10 @@ type ExternalAuthConfig struct {
// 'Username for "https://github.com":'
// And sending it to the Coder server to match against the Regex.
Regex string `json:"regex" yaml:"regex"`
// APIBaseURL is the base URL for provider REST API calls
// (e.g., "https://api.github.com" for GitHub). Derived from
// defaults when not explicitly configured.
APIBaseURL string `json:"api_base_url" yaml:"api_base_url"`
// DisplayName is shown in the UI to identify the auth config.
DisplayName string `json:"display_name" yaml:"display_name"`
// DisplayIcon is a URL to an icon to display in the UI.
+1
View File
@@ -22,6 +22,7 @@ externalAuthProviders:
mcp_tool_allow_regex: .*
mcp_tool_deny_regex: create_gist
regex: ^https://example.com/.*$
api_base_url: ""
display_name: GitHub
display_icon: /static/icons/github.svg
code_challenge_methods_supported: