GitHub Copilot コードレビューに設定機能強化
GitHub は Copilot のコードレビュー機能を更新し、ファイアウォールやカスタム手順の導入、ヘッドブランチからの指示読み込みにより、管理者と開発者の制御力を高めた。
Copilot Code Review に、ファイアウォールの導入やカスタム設定手順、独立したランナー構成のサポートが追加されました。これにより、管理者や開発者は、自環境での Copilot Code Review の動作をより細かく制御できるようになります。
また、カスタム指示書の読み込み先がプルリクエストの head ブランチに変更され、検証が容易になりました。
カスタム指示書を head ブランチから読み込むように変更
これまではベースブランチから読み込んでいたカスタム指示書ですが、現在はプルリクエストの head ブランチから参照されるようになりました。対象となるのは copilot-instructions.md や *.instructions.md、エージェントスキル定義、そして AGENTS.md です。
この変更により、機能ブランチ内でカスタム指示書を反復して作成・テストできるようになりました。マージを待たずに検証が可能になるため、開発フローがスムーズになります。
カスタム指示書ファイルの対応範囲拡大
Copilot Code Review は、リポジトリ内の REVIEW.md、GEMINI.md、CLAUDE.md といったファイルも読み込むようになりました。これにより、カスタマイズ設定がどこに保存されていても、確実に認識されます。
もしチームで既にこれらのファイルにレビューガイドラインやモデル固有の指示を維持している場合、Copilot Code Review は自動的にそれらを検出し、レビュープロセスに組み込んでくれます。
カスタムセットアップ手順のサポート
GitHub Copilot のコードレビュー機能では、copilot-code-review.yml ファイルを .github/workflows/ ディレクトリに配置することで、実行時の環境を柔軟に設定できるようになりました。これにより、依存関係のインストールや、Copilot クラウドエージェントとは独立してリポジトリレベルでランナーを設定したり、必要なツールを整備したり、目的のレビュー結果を得るために事前準備ステップを実行したりすることが可能になります。
copilot-code-review.yml ファイルを追加することで、Copilot コードレビュー専用のセットアップ手順を定義できます。もしこのファイルが存在しない場合、既存の copilot-setup-steps.yml ファイルがあれば、そちらが自動的に使用されます。
詳細な設定方法については、「Copilot コードレビュー環境の設定」に関するドキュメントをご覧ください。
🔒 ファイアウォール対応機能
Copilot コードレビューは現在、デフォルトでファイアウォールの背後で実行されるようになりました。これにより、レビュー実行中のネットワークアクセスが制限されます。このファイアウォール設定は、リポジトリおよび組織レベルの設定から Copilot クラウドエージェントとは別に個別に管理可能で、各エージェントのネットワークアクセスを独立して制御できます。
すべてのリポジトリでデフォルト状態としてファイアウォールが有効になっています。
リポジトリ内でこの設定を変更するには、リポジトリ設定画面へ移動し、「Copilot」→「インターネットへのアクセス」を選択してください。
⚠️ 自己ホスト型ランナーでは、現時点でファイアウォール機能はサポートされていません。Copilot コードレビュー用に自己ホスト型ランナーを設定している場合、レビューは通常通り実行されますが、ファイアウォールの制限は適用されません。
⚙️ コパイロットコードレビューの組織ランナー設定を更新
これまで、コパイロットの「コードレビュー」と「クラウドエージェント」は、組織レベルで単一のランナー設定を共有していました。しかし現在では、組織設定内の「ランナ種別」ページにおいて、この設定が 2 つの独立したセクションに分割されました。これにより、各エージェントに対して異なるランナ種別を個別に選択できるようになりました。
設定を更新するには、まず組織設定へ移動し、「コパイロット」>「ランナ種別」を選択してください。
※本記事は、GitHub Blog にて「Copilot code review: Customization and configurability improvements」として公開されたものです。
原文を表示
Copilot code review now utilizes a firewall, custom setup steps, and independent runner configurations. It now reads custom instructions from the head branch to allow for easy testing and validation of custom instructions. These changes give administrators and developers more control over how Copilot code review runs in their environment.
Expanding custom instructions, now easier to validate
Custom instructions now read from the head branch
Custom instructions are now read from the head branch of the pull request instead of the base branch. This includes copilot-instructions.md, *.instructions.md, agent skills, and AGENTS.md. This means you can iterate on and test custom instructions in a feature branch without needing to merge them first.
Expanded custom instructions file support
Copilot code review now reads REVIEW.md, GEMINI.md, and CLAUDE.md files from your repository, so your customizations are understood regardless of where they live. If your team already maintains review guidelines or model-specific instructions in these files, Copilot code review will automatically pick them up and incorporate them into its review process.
Custom setup steps
You can now configure the environment available to Copilot code review during runtime using a copilot-code-review.yml file in your .github/workflows/ directory. This lets you install dependencies, configure runners on the repository level independently of Copilot cloud agent, set up tooling, or run any preparation steps that Copilot code review needs to produce the reviews you desire for your repository.
Add a copilot-code-review.yml file to your repository to define setup steps specific to Copilot code review.
If no copilot-code-review.yml file exists, Copilot code review will fall back to your existing copilot-setup-steps.yml file if one is present.
To learn more about how to set up a copilot-code-review.yml file, see our documentation on setting the Copilot code review environment.
️ Firewall support
Copilot code review now runs behind a firewall by default, restricting network access during a review. The firewall is configurable separately from Copilot cloud agent in repository and organization settings, giving you independent control over each agent’s network access.
The firewall is enabled by default for all repositories.
To configure this setting in your repository, navigate to your repository settings, then go to Copilot → Internet access.
⚠️ Self-hosted runners do not currently support the firewall. If you have self-hosted runners configured for Copilot code review, your reviews will continue to run as usual without the firewall.
⚙️ Organization runner configuration updates for Copilot code review
Copilot code review and Copilot cloud agent previously shared a single runner configuration at the organization level. That configuration is now split into two separate sections on the Runner type settings page in your organization settings, allowing you to independently choose different runner types for each agent.
To update your configuration, navigate to your organization settings, then go to Copilot → Runner type.
The post Copilot code review: Customization and configurability improvements appeared first on The GitHub Blog.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み