Support model selection when requesting Copilot code review from `gh pr`
- 主要言語
- Go
- スター
- 46.3k
- フォーク
- 9k
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 97
説明
### Describe the feature or problem you’d like to solve
GitHub CLI now supports requesting Copilot code review from the terminal, which appears to address:
- cli/cli#10598
Examples documented in the changelog include:
- `gh pr edit --add-reviewer @copilot`
- `gh pr create --reviewer @copilot`
Related references:
- [GitHub changelog (2026-03-11): Request Copilot code review from GitHub CLI](https://github.blog/changelog/2026-03-11-request-copilot-code-review-from-github-cli/)
- [GitHub changelog (2026-03-05): Pick a model for @copilot in pull request comments](https://github.blog/changelog/2026-03-05-pick-a-model-for-copilot-in-pull-request-comments/)
However, I could not find any way to choose **which model** Copilot should use for the review.
I checked the current implementation around:
- [`pkg/cmd/pr/review/review.go`](https://github.com/cli/cli/blob/trunk/pkg/cmd/pr/review/review.go)
- [`pkg/cmd/pr/shared/params.go`](https://github.com/cli/cli/blob/trunk/pkg/cmd/pr/shared/params.go)
- [`pkg/cmd/pr/create/create.go`](https://github.com/cli/cli/blob/trunk/pkg/cmd/pr/create/create.go)
- [`api/queries_repo_test.go`](https://github.com/cli/cli/blob/trunk/pkg/cmd/pr/create/create.go)
and related PRs:
- #12567
- #12627
- #12854
From what I can tell, the CLI supports `@copilot` as a reviewer identity, but there does not seem to be any parameter or plumbing for passing a model name along with the review request.
### Proposed solution
If the backend/product supports model selection for Copilot code review, it would be helpful for `gh` to expose it.
Possible UX ideas:
```bash
gh pr edit 123 --add-reviewer @copilot --copilot-model gpt-5
gh pr create --reviewer @copilot --copilot-model gpt-5
```
or possibly:
```bash
gh pr edit 123 --add-reviewer @copilot:gpt-5
gh pr create --reviewer @copilot:gpt-5
```
Related issue: #10598
コントリビューションガイド
調査の方向性
まず pkg/cmd/pr/review/review.go、pkg/cmd/pr/shared/params.go、pkg/cmd/pr/create/create.go を読み、その後、関連する PR #12567、#12627、#12854 を確認します。バックエンドが Copilot のレビュー用モデルの選択をサポートしているかを検証し、api/queries_repo_test.go を含む関連する API テストを特定します。バックエンドがサポートしている場合に、合意された CLI インターフェースとモデル選択のための完全な配線が実装されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- github, go
- 領域
- api, cli
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 28/100