chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:37:57 +08:00
commit e30f8ba47c
533 changed files with 115926 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package transport
import (
"net/http"
"github.com/github/github-mcp-server/pkg/http/headers"
)
type UserAgentTransport struct {
Transport http.RoundTripper
Agent string
}
func (t *UserAgentTransport) RoundTrip(req *http.Request) (*http.Response, error) {
req = req.Clone(req.Context())
req.Header.Set(headers.UserAgentHeader, t.Agent)
return t.Transport.RoundTrip(req)
}