Skip to content
Integrations·2 min read

Code repositories

Connect GitHub, Azure Repos or Bitbucket so the AI can point to the file, the line and the fix for the bug.

With repositories connected and code analysis turned on, Capto reads the front-end and back-end code related to the report and comments on the card with the file, the line, the cause and the suggested fix, with a direct link to the line.

GitHub

  1. step 01
    Create a fine-grained token

    GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token.

  2. step 02
    Choose the repositories

    Under Resource owner, the organization. Under Repository access, the front-end and back-end repositories.

  3. step 03
    Grant read-only access

    Under Repository permissions, Contents: Read-only.

  4. step 04
    Approval

    If your organization requires it, an admin approves it in Settings → Personal access tokens → Pending requests.

Azure Repos

Create a Personal Access Token with the Code: Read scope and enter the organization URL.

Bitbucket Cloud

  1. step 01
    Open Atlassian tokens

    At id.atlassian.com → Security → API tokens, click Create API token with scopes.

  2. step 02
    Choose the Bitbucket app

    Give it a name (e.g. Capto) and an expiry date, select Bitbucket and check only read:repository:bitbucket.

  3. step 03
    Connect

    In Capto, enter the workspace (the name in bitbucket.org/<workspace>), the email of the Atlassian account and the token.

Choose repositories and branch

After connecting, click repositories. Check the ones the analysis can read and choose the analyzed branch for each (search helps when there are many). Use the branch of the environment where the bug happens, such as develop in staging.

With no boards selected, the repository applies to all reports. If you select boards, it is used only for reports sent to them.