Skip to main content

Configuring runners for GitHub Copilot code review

Use self-hosted runners or larger GitHub-hosted runners for Copilot revisão de código.

About GitHub Actions usage for code review tools

Copilot revisão de código usa GitHub Actions para executar os recursos de agente, incluindo coleta completa do contexto do projeto e quaisquer recursos em versão prévia pública. Por padrão, Copilot revisão de código usa runners hospedados por GitHub.

Se sua organização tiver desabilitado executores hospedados em GitHub, os recursos de agente não estarão disponíveis. Nesse caso, as revisões de código retornarão a uma revisão mais limitada. Organizations in this situation can use self-hosted runners.

You can also upgrade to larger GitHub-hosted runners for better performance.

Configure self-hosted runners for code review

Run Copilot revisão de código using self-hosted GitHub Actions runners with ARC (Actions Runner Controller). You must first set up ARC-managed scale sets in your environment. For more information on ARC, see Controlador de Ações Runner.

Aviso

ARC is the only officially supported solution for self-hosting Copilot revisão de código. For security reasons, do not use non-ARC self-hosted runners.

Copilot revisão de código is only compatible with Ubuntu x64 Linux runners.

To configure self-hosted runners for Copilot revisão de código:

  1. Configure network security controls for your GitHub Actions runners to ensure that Copilot revisão de código does not have open access to your network or the public internet.

    You must configure your firewall to allow connections to the standard hosts required for GitHub Actions self-hosted runners, plus the following hosts:

    • api.githubcopilot.com
    • uploads.github.com
    • user-images.githubusercontent.com
  2. In your copilot-setup-steps.yml file, set the runs-on attribute to your ARC-managed scale set name. For more information, see Personalizando o ambiente de desenvolvimento para GitHub Copilot agente de nuvem.

    # ...
    
    jobs:
      copilot-setup-steps:
        runs-on: arc-scale-set-name
        # ...
    

Upgrade to larger GitHub-hosted GitHub Actions runners

By default, Copilot revisão de código runs on a standard GitHub Actions runner. Larger runners provide better performance (CPU and memory), more disk space, and advanced features like Azure private networking. See Executores avançados.

Observação

Usage of larger GitHub-hosted runners is billed per-minute and may incur additional GitHub Actions charges.

  1. Set up larger runners for your organization. See Gerenciar executores maiores.

  2. If you are using larger runners with Azure private networking, configure your Azure private network to allow outbound access to the following hosts:

    • api.githubcopilot.com
    • uploads.github.com
    • user-images.githubusercontent.com
  3. In your copilot-setup-steps.yml file, set the runs-on attribute to the label for the larger runners you want Copilot revisão de código to use. See Como executar trabalhos em executores maiores.

    # ...
    
    jobs:
      copilot-setup-steps:
        runs-on: ubuntu-4-core
        # ...