Bitbucket

Learn more on how to setup Qodo on Bitbucket.

Before you start

Integrating Qodo with Bitbucket is a simple process that can be applied to one repository or scaled to multiple workspaces.

Setup usually takes a few minutes, including authentication and pipeline configuration.

Once connected, Qodo will process your pull requests automatically and provide reviews, summaries, or improvement suggestions as part of your Bitbucket workflow.


1. Log In to Qodo Portal

Before setting up Qodo, make sure to create a Qodo account and sign in.

Once you've signed in to the Qodo Portal, you can follow the Qodo Merge installation guide straight from the portal, or continue reading here.

2. Setup Qodo

Once you've signed in to your Qodo account, follow the instructions in the Qodo Portal or below to setup Qodo on Bitbucket.

Bitbucket App

  1. Choose which workspace Qodo should have access to, then click Grant access.

Bitbucket Server

Bitbucket Pipeline

  1. Create a pipelines file: Create a new file named bitbucket-pipelines.yml with the content below:

pipelines:
    pull-requests:
      '**':
        - step:
            name: PR Agent Review
            image: codiumai/pr-agent:latest
            script:
              - pr-agent --pr_url=https://bitbucket.org/$BITBUCKET_WORKSPACE/$BITBUCKET_REPO_SLUG/pull-requests/$BITBUCKET_PR_ID review
  1. Choose your authentication type: You could choose either basic or bearer.

    • bearer = just a token (more secure, no username/password exposure).

    • basic = username + password (or app password) combined and encoded.

  2. Create a token: Based on your authentication type, create a token.

    • If your authentication type is bearer, generate an access token for your Bitbucket repository:

      1. Go to your repository's settings.

      2. Choose Secutiry then Access Tokens.

      3. Generate an access token and save it somewhere safe.

    • If your authentication type is basic, generate a base64 encoded token from your username:password combination and save it somewhere safe.

  3. Add secure variables: Go to your repository's settings. Choose Pipelines. Under Repository variables, add the following variables:

    • OPENAI_API_KEY: <your key>

    • BITBUCKET.AUTH_TYPE: basic or bearer (default is bearer)

    • BITBUCKET__BEARER_TOKEN or BITBUCKET.BASIC_TOKEN: <your token> (obtained from step 3)

You’re all set! Start using Qodo

Visit our usage guide for next steps.

Last updated