Skip to content

Commit 6b3f518

Browse files
committed
fix: simplify REST client configuration by preserving BaseURL and UploadURL in WithAuthToken
1 parent 1b6785d commit 6b3f518

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/ghmcp/server.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,7 @@ func (f *gitHubClientFactory) getRESTClient(ctx context.Context) (*gogithub.Clie
199199
baseClient.UploadURL = f.apiHost.uploadURL
200200
baseClient.UserAgent = f.currentUserAgent()
201201
client := baseClient.WithAuthToken(token)
202-
client.BaseURL = f.apiHost.baseRESTURL
203-
client.UploadURL = f.apiHost.uploadURL
202+
// WithAuthToken does a shallow copy, preserving BaseURL and UploadURL
204203
return client, nil
205204
}
206205

0 commit comments

Comments
 (0)