# Github Copilot Integration

## Log in to Hivel through a Copilot admin account

1. Ensure to use a Copilot admin account, which also has access to all the workspaces applicable for Copilot.
2. Ensure the "Copilot Metrics API" in GitHub is enabled.
   1. Settings >> Copilot >> Copilot Metrics API
3. Navigate to the Integrations screen in the left panel.

<figure><img src="/files/kAmvdtZwEsE8IPblMLud" alt=""><figcaption></figcaption></figure>

## Integrate Copilot

1. Click on the Copilot integration card and follow the steps to redirect to your GitHub account.

<figure><img src="/files/ufaSe9Enzpwe8KpWd99b" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Pz8uxgr4BK6xh4StRYxN" alt=""><figcaption></figcaption></figure>

## Grant permissions to the required workspaces

Once redirected to GitHub, authorize your organization's access by clicking on "Grant" against your organization.

<figure><img src="/files/3Er3OciDqxoIFLnSZzEH" alt=""><figcaption></figcaption></figure>

All done! The data will be processed within 24 hours and you should be able to view the metrics in [<mark style="color:purple;">Copilot Adoption screen</mark>](https://docs.hivel.ai/copilot-adoption).

{% hint style="info" %}
In initial sync, we only have access to 28 days of historical data
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hivel.ai/integrations/ai-tools/github-copilot-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
