Skip to main content
For a workspace at bitbucket.org, use the Bitbucket Cloud setup guide.

Before you begin

  • A company email address you can use to sign in to CodeAnt AI and receive a verification code. Public email addresses such as Gmail or Yahoo are not supported by this sign-in flow.
  • A Bitbucket Data Center account with access to the projects and repositories you want reviewed and permission to create an HTTP access token.
  • A project administrator who can create project webhooks. See Atlassian’s webhook requirements.
  • Your Bitbucket base URL and a repository where you can open a pull request.
CodeAnt must be able to reach your Bitbucket instance to fetch changes and post comments. Your instance must also be able to deliver webhook events to CodeAnt. If the instance is private, contact CodeAnt support to confirm connectivity before setup.

Connect your instance

1

Create an HTTP access token

In Bitbucket Data Center, open your profile menu and select Manage account → HTTP access tokens → Create token.Select Create and copy the token before closing the page. The token’s account must have access to the repositories you want reviewed. See Atlassian’s HTTP access token guide for token permissions and expiry options.
2

Sign in to CodeAnt AI

Open the CodeAnt AI dashboard and select Self-Hosted → Sign in with SSO. Enter your company email address, then enter the verification code sent to your inbox.After sign-in, select Change Provider and choose Bitbucket.
3

Save your Bitbucket details

Enter these values in the setup form:Select Validate & Submit. CodeAnt fetches the projects and repositories available to the token’s account.
Confirm that a repository you expect appears in CodeAnt. Continue with the webhooks below to enable automatic reviews.

Add both project webhooks

In Bitbucket Data Center, open the project containing the repositories you want reviewed. Go to Project settings → Webhooks. Create both webhooks below for that project.
1

Send pull request events to CodeAnt

Select Create webhook and enter:Under Pull request, select Opened, Modified, and Source branch updated. Select Save.Bitbucket Data Center webhook with Opened, Modified, and Source branch updated events selected
2

Send pull request comments to CodeAnt

Select Create webhook again and enter:Under Pull request, select Comment added. Select Save. This webhook delivers review commands and questions posted on PRs.
Confirm that CodeAnt PR Review and CodeAnt PR Comment are listed as active. Repeat this setup for any other projects you want reviewed.

Get your first review

Open a pull request in a connected repository in the configured project. CodeAnt AI reviews the changes and posts feedback directly on the PR. When it finds an issue, its comment explains the problem, severity, and suggested fix. See how to read a review comment. To review an existing PR or rerun a review, post:
The Comment added webhook must be active for this command to reach CodeAnt.

Troubleshooting

Confirm your company email address and check spam, junk, and quarantine folders. If the code is still missing, ask your email administrator to check delivery or contact CodeAnt support.
Check the base URL, company domain, and token value. Confirm that the token has not expired or been revoked and that its account can access the project and repository. If your instance is private, confirm that CodeAnt can reach it; browser access from your machine does not verify this network path.
Confirm that the repository appears in CodeAnt and that both webhooks are active in the PR’s project. Compare their URLs and events with the tables above, then post @codeant-ai: review. If it still fails, contact CodeAnt support with the instance URL, project, and PR URL. Do not include the HTTP access token.
Check that CodeAnt PR Comment uses the comments endpoint and has Comment added selected. The review webhook alone does not deliver PR comments.

Next steps

Customize your reviews

Add review rules for your team’s coding standards.

Configure repository scans

Choose which analyses run and which files they include.