To enable CodeRabbit to interact with your Bitbucket repositories, an API token is required. This token grants the necessary permissions for interacting with the Bitbucket merge request and discussion APIs.
Create a new Bitbucket account specifically for CodeRabbit and treat it as a service account.
Name the account “CodeRabbit”.
If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this new account.
Generate an API Token to enable seamless integration between CodeRabbit and your Bitbucket repositories.
We recommend creating a new user as a service account, associating this user to the workspace you’d like to install CodeRabbit on, and providing CodeRabbit with the API token to allow access. During the installation process, CodeRabbit will automatically configure the required webhook for seamless integration.
If you wish to change the review user, you must provide the API token for the new user who will post reviews and comments. However, this requires manually removing the previous user from the projects and associated webhooks. Once this is done, you will need to reinstall the CodeRabbit app for each project.
By default, if no API token is provided, CodeRabbit will prompt you to provide one during the installation process. However, if you wish to provide the token beforehand, you can do so by navigating to the Organization Settings tab, and selecting the Bitbucket User tab on the sidebar. Once entering the API token, the token will be validated and saved for future use.You can confirm the correct user is being selected by verifying the user ID shown on the UI with the user ID of the service account user you created.
Select the checkbox next to the repositories where you want to install CodeRabbit. To install it on all repositories at once, select the checkbox at the top.
Select Install Repositories.
The webhook https://coderabbit.ai/bitbucketHandler will now be installed for the projects selected.
If you are experiencing issues with the webhook, such as CodeRabbit not being able to access the repository, or not reviewing pull requests, you can manually delete the webhook to the repository.Then refresh the repository page in the CodeRabbit app and you can reinstall the webhook.If you cannot install the webhook please check that your Bitbucket user has the necessary permissions to install the webhook and the API Token is properly configured.