`gh pr edit` 指定審核者,不用每次都先抓一輪組織團隊名單
你用 gh pr edit 幫一份 PR(pull request,你送出等人審核、準備合併的一份程式碼修改)指定審核者,如果只是加某個人,不是加某個團隊,以前這個指令還是會先跑去組織裡把整份團隊名單抓一遍,不管你用不用得到。
現在 gh pr edit 只有你真的要指定某個團隊當審核者時,才會去抓這份名單,其餘情況直接跳過這一步。對你來說,差別在於單純加個人當審核者的操作,不會再被一趟用不到的名單查詢拖慢。
發布日期:2025-10-15
你用 gh pr edit 幫一份 PR(pull request,你送出等人審核、準備合併的一份程式碼修改)指定審核者,如果只是加某個人,不是加某個團隊,以前這個指令還是會先跑去組織裡把整份團隊名單抓一遍,不管你用不用得到。
現在 gh pr edit 只有你真的要指定某個團隊當審核者時,才會去抓這份名單,其餘情況直接跳過這一步。對你來說,差別在於單純加個人當審核者的操作,不會再被一趟用不到的名單查詢拖慢。
這幾個小毛病都出在不會特別留意的地方。清快取(cache,算過的結果先存著、下次直接拿)時,gh cache delete 回報的刪除筆數以前會算錯。不管你只給 key,還是 key 再加上 ref(git 參照,標出這份快取屬於哪個分支),現在數字都對得上。gh agent-task create 加 --follow 看進度,以前跑完那個轉圈指示器不會自己停,現在結束就跟著收掉。同樣是這個指令,以前派工可能送到上游倉庫(upstream repo,你這份倉庫的來源),而不是你設定的預設倉庫,現在會送對。另外,auth login 與 auth refresh 改走 UNIX socket(同一台電腦裡程式互傳資料的通道,不繞網路)。
You use gh pr edit to set reviewers on a PR — a pull request, the code change you've submitted and are waiting on someone to review before it merges. Add just one person, not a team, and until now the command would still go fetch your entire org's team list first, whether you needed it or not.
Now gh pr edit only fetches that list when you're actually naming a team as a reviewer, and skips the step the rest of the time. For you, that means adding a single person as a reviewer no longer gets slowed down by a team lookup you never needed.
These are the kind of small bugs you'd never notice unless you hit them directly. When you clear the cache — results stored earlier so you don't have to recompute them — gh cache delete used to report the wrong number of deleted entries; now the count is right whether you pass just a key or a key plus a ref, the git reference marking which branch a cache entry belongs to. Run gh agent-task create with --follow to watch progress, and the spinner used to keep spinning after the run finished; now it stops right when the task does. That same command used to sometimes dispatch work to the upstream repo — the repo yours was forked from — instead of your configured default repo; now it goes to the right one. And auth login and auth refresh now talk over a UNIX socket instead of the network.
`gh pr edit`: Only fetch org teams for reviewers when required by @BagToad in https://github.com/cli/cli/pull/11835fix(cache delete): report correct deleted count for key and key+ref deletions by @luxass in https://github.com/cli/cli/pull/11838
`gh agent-task create`: Fix `--follow` not killing the progress indicator by @BagToad in https://github.com/cli/cli/pull/11879
`gh agent-task create`: Fix targetting upstream instead of default repo by @BagToad in https://github.com/cli/cli/pull/11896
Fix `auth login` and `auth refresh` to use UNIX socket by @babakks in https://github.com/cli/cli/pull/11922