Connect GitHub

This page describes how to connect GitHub to Agentspace.

After the initial setup and data import, the data store automatically synchronizes data from your configured source at the specified frequency.

Supported versions

GitHub connector only supports GitHub Enterprise Cloud.

Before you begin

Before you set up your connection, you must obtain a classic personal access token from the GitHub instance to integrate with Agentspace. For more information about creating a classic personal access token, see Creating a personal access token (classic).

Minimum permissions

To create a GitHub connector, a personal access token requires the minimum permissions listed in the following table. To know more about creating a classic personal access token, see Creating a personal access token (classic).

Permission Usage reason Description
repo Enforce Access Control Lists (ACLs) Allows connector to read and write to all public and private repositories, including code, commit statuses, invitations, and webhooks.
read:org Enforce ACLs Allows the connector to read organization projects, memberships, and team affiliations.
read:audit_log Enforce ACLs Allows the connector to read audit log data.
read:user Enforce ACLs Allows the connector to read a user's profile information.
user:email Enforce ACLs Allows the connector to read a user's email address.

Create a GitHub data store

Console

To use the Google Cloud console to sync data from GitHub to Agentspace , follow these steps:

  1. In the Google Cloud console, go to the Agentspace page.

    Agentspace

  2. In the navigation menu, click Data stores.

  3. Click Create data store.

  4. On the Select a data source page, scroll or search for GitHub and select it.

  5. In the Authentication settings section, enter the personal access token of your GitHub instance.

  6. Click Continue.

  7. Optional. To allow a specific set of static IP addresses in your system, select Enable static IP addresses in the Advanced options section.

  8. Click Continue.

  9. In the Entities to sync section, do the following:

    1. Select which entities to sync:

      • Pull request
      • Pull request comment
      • Issue
      • Issue comment
      • Branch
      • Commit
      • File
        entities_to_sync
        Entities to sync
    2. Optionally, to sync specific repositories, do the following:

      1. Click Filter.
      2. To filter entities out of the index select Exclude from the index or to ensure that they are included in the index select Include to the index.
      3. Enter the filter criteria in the following format: ORG_ID/REPO_NAME/BRANCH_ID
        • ORG_ID: The unique identifier of the GitHub organization.
        • REPO_NAME: The name of the specific repository within the organization.
        • BRANCH_ID: The identifier of the branch within the repository. To include all branches, enter *.
          entities_to_sync
          Entities to sync
  10. Select the Sync frequency for Full sync and the Incremental sync frequency for Incremental data sync. For more information, see Sync frequency.

    If you want to schedule separate full syncs of entity and identity data, expand the menu under Full sync and then select Custom options.

    Custom options for full data sync.
    Setting separate schedules for full entity sync and full identity sync.
  11. In the Configure your data connector section:

    1. Select a region for your data store. You cannot change the region later. For more information on multi-regions, see AI Applications locations.

    2. Enter a name for your data connector. You can change the name later.

    3. Optional. To change the data connector ID after entering the name, click Edit and change the value. You cannot change the data connector ID after creating the data store.

    4. Click Create. Agentspace creates your data store and displays it on the Data Stores page.

To check the status of your ingestion, go to the Data stores page and click your data store name to see details about it on its Data page. The Connector state changes from Creating to Running when it starts synchronizing data. When ingestion is complete, the state changes to Active to indicate that the connection to your data source is set up and awaiting the next scheduled synchronization. Depending on the size of your data, ingestion can take several minutes or several hours.

Known limitations

  • Only classic personal access tokens are supported by the GitHub connector.

Rate limits

  • GitHub limits API requests to 5000 per hour for the connector.

Next steps

  • To attach your data store to an app, create an app and select your data store following the steps in Create an app.

  • To preview how your search results appear after your app and data store are set up, see Preview search results.