Skip to main content

Configuring your GitHub App for your Copilot agent

Learn how to configure your GitHub App so that it is associated with your Copilot agent.

Note

GitHub Copilot Extensions 目前为有限公开 beta 版本,可能随时发生更改。 若要请求访问 Copilot Extensions,请加入候补名单

Once you have configured your server and created your GitHub App, you need to configure your GitHub App for use with your Copilot agent.

Prerequisites

Configuring your GitHub App

  1. 在 GitHub 上任意页的右上角,单击你的个人资料照片。

  2. 导航到你的帐户设置。

    • 对于由个人帐户拥有的应用,请单击“设置”****。
    • 对于组织拥有的应用:
      1. 单击“你的组织”。
      2. 在组织右侧,单击“设置”。
  3. 在左侧边栏中,单击“ 开发人员设置”。

  4. 在左侧边栏中,单击“GitHub Apps”。

  5. To the right of the GitHub App you want to configure for your Copilot Extension, click Edit.

  6. In the "Identifying and authorizing users" section, under "Callback URL", enter your server's hostname, then click Save changes.

    Note

    This step is only required if you intend to request user authorization (OAuth) during installation.

    Your server's hostname is the forwarding endpoint that you copied from your terminal when you configured your server. For more information, see "Configuring your server to deploy your Copilot agent."

    If you are using an ephemeral domain in ngrok, you will need to update this URL every time you restart your ngrok server.

  7. In the left sidebar, click Permissions & events.

  8. To expand the "Account permissions" section, click anywhere in the section.

  9. In the "GitHub Copilot Chat" row, select the Access: dropdown menu, then click Read-only. Click Save changes.

  10. In the left sidebar, click Copilot.

  11. Read the GitHub Marketplace Developer Agreement and the GitHub Pre-release License Terms, then accept the terms for creating a Copilot Extension.

  12. In the "App type" section, select the dropdown menu, then click Agent.

  13. Under "URL," enter your server's hostname (aka forwarding endpoint) that you copied from your terminal.

    Note

    If you are using an ephemeral domain in ngrok, you will need to update this URL every time you restart your ngrok server.

  14. Under "Inference description", type a brief description of your agent, then click Save. This will be the description users see when they hover over your agent's slug in the chat window.

  15. Your pre-authorization URL is a link on your website that starts the authorization process for your extension. Users will be redirected to this URL when they decide to authorize your extension. If you are using a pre-authorization URL, under "Pre-authorization URL," enter the URL, then click Save changes.

  16. In your GitHub App settings, in the left sidebar, click Install App, then, next to the account you want to install your app on, click Install.

  17. 在 GitHub.com 的任何页面上,单击页面右上角的 GitHub Copilot 图标。

    此时将显示 GitHub Copilot Chat 面板。 要调整面板的大小,请单击并拖动顶部或左侧边缘。

  18. 如果面板包含与 Copilot 的前一次对话,请单击面板右上角的“新建对话”图标(加号)。

    “新建对话”按钮的屏幕截图,以深橙色边框突出显示。

  19. Invoke your extension by typing @EXTENSION-NAME, replacing any spaces in the extension name with -, then press Enter.

  20. If this is your first time using the extension, you will be prompted to authenticate. Follow the steps on screen to authenticate your extension.

  21. Ask your extension a question in the chat window. For example, What is the software development lifecycle?.