🌐 AI搜索 & 代理 主页
Skip to content

Commit cfda035

Browse files
committed
Mock out the observability exporters when generating docs
1 parent e10ff3e commit cfda035

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cmd/github-mcp-server/generate_docs.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import (
1111

1212
"github.com/github/github-mcp-server/pkg/github"
1313
"github.com/github/github-mcp-server/pkg/lockdown"
14+
"github.com/github/github-mcp-server/pkg/observability"
15+
"github.com/github/github-mcp-server/pkg/observability/log"
1416
"github.com/github/github-mcp-server/pkg/raw"
1517
"github.com/github/github-mcp-server/pkg/toolsets"
1618
"github.com/github/github-mcp-server/pkg/translations"
@@ -67,7 +69,9 @@ func generateReadmeDocs(readmePath string) error {
6769

6870
// Create toolset group with mock clients
6971
repoAccessCache := lockdown.GetInstance(nil)
70-
tsg := github.DefaultToolsetGroup(false, mockGetClient, mockGetGQLClient, mockGetRawClient, t, 5000, github.FeatureFlags{}, repoAccessCache)
72+
nilLogger := log.NewNoopLogger()
73+
nilObsv := observability.NewExporters(nilLogger)
74+
tsg := github.DefaultToolsetGroup(false, mockGetClient, mockGetGQLClient, mockGetRawClient, t, 5000, github.FeatureFlags{}, repoAccessCache, nilObsv)
7175

7276
// Generate toolsets documentation
7377
toolsetsDoc := generateToolsetsDoc(tsg)
@@ -307,7 +311,9 @@ func generateRemoteToolsetsDoc() string {
307311

308312
// Create toolset group with mock clients
309313
repoAccessCache := lockdown.GetInstance(nil)
310-
tsg := github.DefaultToolsetGroup(false, mockGetClient, mockGetGQLClient, mockGetRawClient, t, 5000, github.FeatureFlags{}, repoAccessCache)
314+
nilLogger := log.NewNoopLogger()
315+
nilObsv := observability.NewExporters(nilLogger)
316+
tsg := github.DefaultToolsetGroup(false, mockGetClient, mockGetGQLClient, mockGetRawClient, t, 5000, github.FeatureFlags{}, repoAccessCache, nilObsv)
311317

312318
// Generate table header
313319
buf.WriteString("| Name | Description | API URL | 1-Click Install (VS Code) | Read-only Link | 1-Click Read-only Install (VS Code) |\n")

0 commit comments

Comments
 (0)