Skip to content

Commit cab9539

Browse files
Copilotlpcox
andauthored
fix: add GHEC test case and upstream URL to proxy startup output
Agent-Logs-Url: https://github.com/github/gh-aw-mcpg/sessions/610360e8-6143-472a-9f09-bf7a1cf0f2ce Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent c0b71a1 commit cab9539

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

internal/cmd/proxy.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ func runProxy(cmd *cobra.Command, args []string) error {
218218
// Print connection info
219219
fmt.Fprintf(os.Stderr, "\nMCPG GitHub API Proxy\n")
220220
fmt.Fprintf(os.Stderr, " Listening: %s://%s\n", scheme, actualAddr)
221+
fmt.Fprintf(os.Stderr, " Upstream: %s\n", apiURL)
221222
fmt.Fprintf(os.Stderr, " Mode: %s\n", proxyDIFCMode)
222223
fmt.Fprintf(os.Stderr, " Guard: %s\n", proxyGuardWasm)
223224
if tlsCfg != nil {

internal/proxy/proxy_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,11 @@ func TestDeriveGitHubAPIURL(t *testing.T) {
933933
envVars: map[string]string{"GITHUB_SERVER_URL": "https://github.example.com"},
934934
expected: "https://github.example.com/api/v3",
935935
},
936+
{
937+
name: "GITHUB_SERVER_URL=https://github.com falls back to api.github.com",
938+
envVars: map[string]string{"GITHUB_SERVER_URL": "https://github.com"},
939+
expected: DefaultGitHubAPIBase,
940+
},
936941
}
937942

938943
for _, tt := range tests {

0 commit comments

Comments
 (0)