usage

GitHub CLI 2.89.0

工具與目錄
在這頁

新功能 4 項

01

建立提取要求與議題時,可搜尋負責人並依登入身分送出變更

你用 gh pr create、gh issue create 或 gh issue edit 建立或修改提取要求、議題時,現在能用搜尋方式挑選負責人。在 github.com 上,指令也會依你目前登入的身分處理這些變更;不必先記住完整帳號再手動填入。這讓「要交給誰跟進」這一步更容易從候選人中找到正確的人,就像在通訊錄搜尋名字後再把信交給收件人。

官方原文

gh pr create, gh issue create, gh issue edit: search-based assignee selection and login-based mutation on github.com by [@BagToad](https://github.com/BagToad) in [#13009](https://github.com/cli/cli/pull/13009)

02

可用實驗開關試用 huh 提示介面

你想試用新的互動式提問畫面時,可以設定 GH_EXPERIMENTAL_PROMPTER 這個環境變數(啟動程式前交給它的設定值),開啟只使用 huh 的實驗性提示介面。它被明確放在實驗開關後面,代表這是可選的測試功能,而不是所有人都會自動換上的正式預設,也可隨時不使用。就像先拿到一把試用鑰匙,再決定要不要進新裝潢的房間。

官方原文

Add experimental huh-only prompter gated by GH_EXPERIMENTAL_PROMPTER by [@BagToad](https://github.com/BagToad) in [#12859](https://github.com/cli/cli/pull/12859)

03

企業雲端的 Copilot 連線更能找到正確位置,並標記代理呼叫

你在 ghe.com 租戶使用 agent-task 時,GitHub CLI 現在會動態找出正確的 Copilot API(程式彼此溝通的入口)網址,不再固定使用一個地址。同時,由代理執行的呼叫會記錄在 User-Agent(請求附帶的用戶端身分標籤)標頭中,並把 actor-mode 的判斷集中到 ApiActorsSupported。這些是連線與識別層的調整,像客服總機會依公司分機轉接,並在來電單上標出代辦來源。

官方原文

fix(agent-task): resolve Copilot API URL dynamically for ghe.com tenancies by [@BagToad](https://github.com/BagToad) in [#12956](https://github.com/cli/cli/pull/12956)

Record agentic invocations in User-Agent header by [@williammartin](https://github.com/williammartin) in [#13023](https://github.com/cli/cli/pull/13023)

Consolidate actor-mode signals into ApiActorsSupported by [@BagToad](https://github.com/BagToad) in [#13025](https://github.com/cli/cli/pull/13025)

04

更新維護指引、測試與相依套件,整理專案的後台工作

你不會多一個要學的新指令,但 GitHub CLI 專案把維護工作的底子重新整理了:新增 AGENTS.md、讓 triage.md 對齊目前分類流程、移除議題範本的自動標籤,並修正 README 連結的多餘空格。驗收測試也修了 Git 身分、headRepository JSON 與過時走訪測試;gRPC、容器登錄、keyring、MSBuild、Homebrew 與 Azure 登入等相依套件都升級。三位新貢獻者也在此版完成首次提交。像整理廚房的食譜、門牌和備料,客人未必看見,廚房卻更容易照流程運作。

官方原文

Add AGENTS.md by [@williammartin](https://github.com/williammartin) in [#13024](https://github.com/cli/cli/pull/13024)

Fix typo: remove extra space in README.md link by [@realMelTuc](https://github.com/realMelTuc) in [#12725](https://github.com/cli/cli/pull/12725)

Align triage.md with current triage process by [@tidy-dev](https://github.com/tidy-dev) in [#13030](https://github.com/cli/cli/pull/13030)

Remove auto-labels from issue templates by [@tidy-dev](https://github.com/tidy-dev) in [#12972](https://github.com/cli/cli/pull/12972)

Fix acceptance test failures: git identity, headRepository JSON, obsolete traversal test by [@BagToad](https://github.com/BagToad) in [#13037](https://github.com/cli/cli/pull/13037)

chore(deps): bump google.golang.org/grpc from 1.79.2 to 1.79.3 by [@dependabot](https://github.com/dependabot)[bot] in [#12963](https://github.com/cli/cli/pull/12963)

chore(deps): bump github.com/google/go-containerregistry from 0.20.7 to 0.21.3 by [@dependabot](https://github.com/dependabot)[bot] in [#12962](https://github.com/cli/cli/pull/12962)

chore(deps): bump github.com/zalando/go-keyring from 0.2.6 to 0.2.8 by [@dependabot](https://github.com/dependabot)[bot] in [#13031](https://github.com/cli/cli/pull/13031)

chore(deps): bump microsoft/setup-msbuild from 2.0.0 to 3.0.0 by [@dependabot](https://github.com/dependabot)[bot] in [#13005](https://github.com/cli/cli/pull/13005)

chore(deps): bump mislav/bump-homebrew-formula-action from 3.6 to 4.1 by [@dependabot](https://github.com/dependabot)[bot] in [#13004](https://github.com/cli/cli/pull/13004)

chore(deps): bump azure/login from 2.3.0 to 3.0.0 by [@dependabot](https://github.com/dependabot)[bot] in [#12951](https://github.com/cli/cli/pull/12951)

[@joshjohanning](https://github.com/joshjohanning) made their first contribution in [#13021](https://github.com/cli/cli/pull/13021)

[@realMelTuc](https://github.com/realMelTuc) made their first contribution in [#12725](https://github.com/cli/cli/pull/12725)

[@Lslightly](https://github.com/Lslightly) made their first contribution in [#13033](https://github.com/cli/cli/pull/13033)

修正 1 項

05

建立與轉移議題少拿多餘資料,Codespaces 連接埠轉送更穩

你建立或轉移議題時,issue create 和 issue transfer 不再抓取不需要的欄位,少做一段無用的資料請求。使用 Codespaces 的連接埠轉送(把雲端開發環境的服務接到可存取位置)時,也修掉了資料競爭,也就是兩個工作同時改同一份資料而互相撞車的問題。另補充 gh pr edit --add-reviewer 可以再次請求審查的說明。像寄件時少塞無關附件,並替同時通過窄門的人排好隊。

官方原文

fix(issue): avoid fetching unnecessary fields in issue create and issue transfer by [@babakks](https://github.com/babakks) in [#12884](https://github.com/cli/cli/pull/12884)

fix: resolve data race in codespaces port forwarder by [@Lslightly](https://github.com/Lslightly) in [#13033](https://github.com/cli/cli/pull/13033)

docs: clarify that gh pr edit --add-reviewer can re-request reviews by [@joshjohanning](https://github.com/joshjohanning) in [#13021](https://github.com/cli/cli/pull/13021)