Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

README: GITHUB_TOOLSETS doesn't take precedence over --toolsets (viper gives the flag priority)

未關閉 適合新手
#3,578 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

還沒有人認領這個 Issue。

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
90/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
go
領域
documentation

研究方向

閱讀 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

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/github-mcp-server 的其他 Issue

查看 github/github-mcp-server 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。