> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trydepth.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding a New Repository

> Learn how to connect and index your GitHub repository with Depth AI

This guide covers how to connect GitHub to Depth AI and add repositories for indexing.

## Connect to GitHub

Before adding repositories, an organization admin needs to complete the GitHub integration.

<Note>
  Only organization admins can complete the GitHub integration. This step is required before any repositories can be added.
</Note>

<Steps>
  <Step title="Connect GitHub Account">
    First, connect your GitHub account to Depth AI:

    1. Navigate to the Settings page
    2. Click on "Connect"
    3. Authorize Depth AI to access your GitHub account

    <Frame>
      <img src="https://mintcdn.com/depthai/EGK_mLAbRrvUxRQF/images/add_repo/connect.png?fit=max&auto=format&n=EGK_mLAbRrvUxRQF&q=85&s=d01be87022aac7bd3bc13074daff6a38" alt="Connect to GitHub" width="1165" height="517" data-path="images/add_repo/connect.png" />
    </Frame>
  </Step>

  <Step title="Install GitHub App">
    Install the Depth AI GitHub app and configure repository permissions by clicking on "Configure" button:

    1. Choose between "All repositories" or "Only select repositories"
    2. Grant the required read permissions for the selected repositories
    3. Click "Install" to complete the setup

    <Frame>
      <img src="https://mintcdn.com/depthai/EGK_mLAbRrvUxRQF/images/add_repo/configure.png?fit=max&auto=format&n=EGK_mLAbRrvUxRQF&q=85&s=f636a8d77ab15a49eaa374917862ce91" alt="Install GitHub App" width="1161" height="506" data-path="images/add_repo/configure.png" />
    </Frame>
  </Step>
</Steps>

## Add a Repository

Once GitHub is connected, you can start adding repositories for indexing.

<Note>
  All members of your organization will have access to the indexed repositories. Make sure you only index repositories that you want to share with your entire team.
</Note>

<Steps>
  <Step title="Add Repository URL">
    Navigate to the repositories section and click on "Add Repository". Enter the GitHub repository URL you want to index.

    <Frame>
      <img src="https://mintcdn.com/depthai/EGK_mLAbRrvUxRQF/images/add_repo/add-repo-url.png?fit=max&auto=format&n=EGK_mLAbRrvUxRQF&q=85&s=965d71cdf7f6c4a3b59264db3fa82c1f" alt="Add Repository URL" width="1166" height="522" data-path="images/add_repo/add-repo-url.png" />
    </Frame>
  </Step>

  <Step title="Verify Repository Access">
    The system will check if Depth AI has the necessary permissions to access your repository.

    <Note>
      If this is your first time adding a repository, you'll need to install and configure the Depth AI GitHub app.
    </Note>

    <Frame>
      <img src="https://mintcdn.com/depthai/EGK_mLAbRrvUxRQF/images/add_repo/check-access.png?fit=max&auto=format&n=EGK_mLAbRrvUxRQF&q=85&s=304282bde8cb5f095655587f4ab2bd12" alt="Repository Access Check" width="861" height="1013" data-path="images/add_repo/check-access.png" />
    </Frame>
  </Step>

  <Step title="Configure GitHub App (if needed)">
    If access is denied, you'll need to configure the GitHub app permissions:

    1. Click the "Configure GitHub App" button
    2. You'll be redirected to GitHub's permission page
    3. Choose either "All repositories" or "Only select repositories"
    4. Grant the required permissions:
       * Read access to code, issues, metadata, and pull requests
       * Read access to Copilot Chat (optional)

    <Frame>
      <img src="https://mintcdn.com/depthai/EGK_mLAbRrvUxRQF/images/add_repo/add-permissions.png?fit=max&auto=format&n=EGK_mLAbRrvUxRQF&q=85&s=2dde976810006f221269868f3e7f8f16" alt="Configure GitHub Permissions" width="938" height="1279" data-path="images/add_repo/add-permissions.png" />
    </Frame>
  </Step>

  <Step title="Add Starter Questions (Optional)">
    You can add up to four starter questions that will be shown to users when they begin a new conversation with this repository. These could include:

    * Setup instructions
    * Common troubleshooting queries
    * Feature-specific questions
    * Bug reporting templates

    Click on "Start Indexing" to begin the repository crawl.

    <Frame>
      <img src="https://mintcdn.com/depthai/EGK_mLAbRrvUxRQF/images/add_repo/add-starter-questions.png?fit=max&auto=format&n=EGK_mLAbRrvUxRQF&q=85&s=387b3418a5c78924115e49a634b620c2" alt="Starter Questions" width="862" height="964" data-path="images/add_repo/add-starter-questions.png" />
    </Frame>
  </Step>

  <Step title="Wait for Indexing to complete">
    Wait for the indexing to complete. This may take a few hours for large repositories.

    <Frame>
      <img src="https://mintcdn.com/depthai/EGK_mLAbRrvUxRQF/images/add_repo/queued.png?fit=max&auto=format&n=EGK_mLAbRrvUxRQF&q=85&s=d008854cdae180e6a51f3d30ce428ada" alt="Indexing Progress" width="1169" height="672" data-path="images/add_repo/queued.png" />
    </Frame>

    <Note>
      The indexing time depends on the repository size. Larger repositories may take longer to process.
    </Note>
  </Step>

  <Step title="Start Chatting">
    Once all stages show "DONE", your repository is ready for chat!

    <Frame>
      <img src="https://mintcdn.com/depthai/EGK_mLAbRrvUxRQF/images/add_repo/start-chatting.png?fit=max&auto=format&n=EGK_mLAbRrvUxRQF&q=85&s=6d738dc919c0cf8c497a56dcc69f25ed" alt="Start Chatting" width="1156" height="897" data-path="images/add_repo/start-chatting.png" />
    </Frame>
  </Step>
</Steps>
