Skip to main content

GitHub/GitLab/Bitbucket

AI/Run CodeMie assistants can work with Git repositories. Apart from integrating the Git tool for such purposes, assistants must also know what repository to deal with. To connect assistant with the repository, it is required to provide the repository link or upload the codebase and specify the target branch to work with.

Integrating Version Control Systems allows assistants to navigate to the code repositories and perform various actions on your behalf, whether it is simple code analysis or creating pull requests with code that solves the problem indicated in a JIRA task. It is worth mentioning that this integration is required when adding a code repository.

To integrate Version Control System tool in AI/Run CodeMie, follow the steps below:

1. Prepare Credentials

GitHub supports two authentication methods. Choose the one that best fits your organization's security requirements.

Option A: Personal Access Token (PAT)

Generate a Personal Access Token in your GitHub account with the following scopes:

  • repo
  • repo:status
  • repo_deployment
  • public_repo
  • repo:invite
  • security_events
  • project
  • read:project
note

Save the token value in a secure location. GitHub shows the token value only once after generation.

Option B: GitHub Application

GitHub Apps provide stronger security and finer-grained permissions compared to PATs. They authenticate as an installation rather than as a user, which is preferred for organizational use.

To use GitHub App authentication, you need:

  1. Create a GitHub App in your GitHub organization or account:

    • Go to Settings → Developer settings → GitHub Apps → New GitHub App
    • Set the required repository permissions (Contents: Read & Write, Pull requests: Read & Write, Metadata: Read)
    • After creating the app, note the App ID shown on the app's settings page
  2. Generate a private key:

    • On the GitHub App settings page, scroll to Private keys
    • Click Generate a private key — a .pem file will be downloaded
    • Open the file and copy its full contents (including the -----BEGIN RSA PRIVATE KEY----- header and footer)
  3. Install the GitHub App on your organization or repository:

    • Go to Settings → Developer settings → GitHub Apps → Edit → Install App
    • Install it on the organization or specific repositories that CodeMie needs access to
    • After installation, note the Installation ID from the installation URL (e.g., https://github.com/settings/installations/12345678)
tip

The Installation ID is optional — if you leave it blank, CodeMie will auto-detect the first available installation for your App.

2. Configure Integration in CodeMie

  • In the AI/Run CodeMie main menu, click the Integrations button

Integrations menu

  • Select User Integration or Project Integration (only for applications-admin, for that create request in support) and click + Create

Create integration

  • Set Credential Type to Git, enter an Alias, and set the URL to your Git host (e.g., https://github.com)

  • Select your Authentication Type:

Select Personal Access Token from the Authentication Type dropdown and fill in:

FieldDescription
Token NameThe username or token label (e.g., oauth2 for GitHub/GitLab, your Bitbucket username for Bitbucket)
TokenThe token value you generated in step 1

Integration credentials PAT

  • Click Save to create the integration
note

The project name for the integration must match the project of the indexed repository.

That's it. Now you can add code repositories to your AI/Run CodeMie account.