README: GITHUB_TOOLSETS doesn't take precedence over --toolsets (viper gives the flag priority)
維護者通常 2 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 新手友好度
- 90/100
- Issue 類型
- 文件
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- go
研究方向
閱讀 README.md 大約第 468 行,以及 cmd/github-mcp-server/main.go 中的 viper 綁定(第 87-90、280、313-317 行),以確認 flag 優先級。修改 README 中的句子,說明 --toolsets 覆蓋 GITHUB_TOOLSETS。當文件與 viper 的 lookup order 一致時完成。
由索引模型根據 Issue 內容生成。
描述
The README says:
"The environment variable GITHUB_TOOLSETS takes precedence over the command line argument if both are provided."
https://github.com/github/github-mcp-server/blob/f38526264abb14961b32cea386e38ec6d3cf674f/README.md?plain=1#L468
--toolsets is bound through viper, and the env is wired with AutomaticEnv:
https://github.com/github/github-mcp-server/blob/f38526264abb14961b32cea386e38ec6d3cf674f/cmd/github-mcp-server/main.go#L280
https://github.com/github/github-mcp-server/blob/f38526264abb14961b32cea386e38ec6d3cf674f/cmd/github-mcp-server/main.go#L313-L317
https://github.com/github/github-mcp-server/blob/f38526264abb14961b32cea386e38ec6d3cf674f/cmd/github-mcp-server/main.go#L87-L90
Viper's lookup order is Set() > flag (if changed) > env > config > default, so when both are given the flag wins, the opposite of the README. That matters a bit for anyone trying to narrow toolsets via env on top of a launcher that already passes --toolsets. Probably just the README sentence that needs flipping.
Found while testing a docs-vs-code checker I'm building (Elliot), then verified by hand.
- 主要語言
- Go
- 星號
- 33.8k
- 分支
- 5.2k
- 平均合併
- 2 天 18 小時
- 30 天內合併 PR
- 38
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
github/github-mcp-server 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
github/github-mcp-server#3581 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
github/github-mcp-server#3572 ·
維護者通常 2 天內回覆
-
Add Zero-Docker quick start and clarify no‑Docker options in README可能已有人在做 @Flanxiyum001 於 11 天前認領。 未關閉documentation
難度 2/5 1-3 小時 新手友好度 68/100
github/github-mcp-server#3495 ·
維護者通常 2 天內回覆
-
Integer parameters equal to 2^63 pass the range check in toInt and wrap to a negative number可能已有人在做 @xiao115255 於 12 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 82/100
github/github-mcp-server#3489 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
github/github-mcp-server#3475 ·
維護者通常 2 天內回覆
查看 github/github-mcp-server 的全部 Issue
相似的 Issue
-
stage-fail
難度 1/5 1 小時以內 新手友好度 72/100
siyuan-note/bazaar#2405 ·
維護者通常 1 天內回覆
-
bug priority: high workstream:cache
難度 2/5 1-3 小時 新手友好度 76/100
rossoctl/context-guru#707 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 73/100
prime-radiant-inc/evener#5028 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 85/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100