You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
@@ -13,90 +13,90 @@ CodeRabbit integrates with Bitbucket Cloud to enhance code review and collaborat
This guide will assist you in effectively integrating CodeRabbit with Bitbucket Cloud.
## ConfigureApp Password
## ConfigureAPI Token
To enable CodeRabbit to interact with your Bitbucket repositories, an app password is required. This token grants the necessary permissions for interacting with the Merge Requests and Discussions APIs.
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.
1. Create a new Bitbucket account specifically for CodeRabbit and treat it as a service account.
2. Name the account "CodeRabbit".
3. If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this new account.
4. Generate an App Password to enable seamless integration between CodeRabbit and your Bitbucket repositories.
3. If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this
new account.
4. 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 app password to allow access. During the installation process, CodeRabbit will automatically configure the required webhook for seamless integration.
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.
:::note
If you wish to change the review user, you must provide the app password 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.
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.
:::
### Recommendations
- **Create a dedicated user for CodeRabbit** - This ensures the user is exclusively for CodeRabbit, allowing better access control.
- **Create a dedicated user for CodeRabbit** - This ensures the user is exclusively for CodeRabbit, allowing better
access control.
- **Use "CodeRabbit" as the username** - This makes the user easily recognizable for future reference.
- **Use a dedicated email address** - This helps in easy identification and management.
- **Use the CodeRabbit logo as the profile picture** - This further ensures easy recognition. You can download our logo from [here](/img/integrations/logo.svg "download").
- **Developer Access** Ensure the service account user has developer access to the projects that you wish to install CodeRabbit on.
- **Use the CodeRabbit logo as the profile picture** - This further ensures easy recognition. You can download our logo
from [here](/img/integrations/logo.svg "download").
- **Developer Access** Ensure the service account user has developer access to the projects that you wish to install
CodeRabbit on.
#### Key Points to Remember
- Code reviews will be attributed to the owner of theapp password.
- Code reviews will be attributed to the owner of theAPI token.
#### Generating anApp password
#### Generating anAPI token
Bitbucket provides an option to generate anapp password for a new user. Follow these steps to generate thepassword:
Bitbucket provides an option to generate anAPI token for a new user. Follow these steps to generate thetoken:
1. Log in using the user designated for CodeRabbit reviews. This user serves as a service account for managing reviews and related activities.
2. Go to "Personal Bitbucket Settings".
3. Choose **App passwords**.
4. Click **Create app password**.
5. Enter a label easily recognizable for this app passwords usage.
1. Log in using the user designated for CodeRabbit reviews. This user serves as a service account for managing reviews
and related activities.
2. Go to [API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens).
3. Click **Create API token with scopes**.
4. Enter a name easily recognizable for this API token usage and an expiration date based on your plan of using the
product.
5. On next step select **Bitbucket**
6. Ensure the following scopes are selected:
1. Account - Read
2. Issues - Write
3. Workspace membership - Read
4. Projects - Write
5. Repositories - Write
6. Pull requests - Write
7. Webhooks - Read and write
8. Pipelines - Read
9. Runners - Read
- read:account
- read:user:bitbucket
- write:issue:bitbucket
- read:issue:bitbucket
- read:workspace:bitbucket
- admin:project:bitbucket
- write:webhook:bitbucket
- read:webhook:bitbucket
- read:pipeline:bitbucket
- read:runner:bitbucket
- read:repository:bitbucket
- write:repository:bitbucket
- read:pullrequest:bitbucket
- write:pullrequest:bitbucket
7. Click **Create**
8. Note down the app password as it will only be displayed once.
8. Note down the API token as it will only be displayed once.
### Where to Provide CodeRabbit theApp Password
### Where to Provide CodeRabbit theAPI Token
By default, if no app password 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 app password, the password will be validated and saved for future use.
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.
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.
---
### Installing CodeRabbit into your Bitbucket Repositories
1. Go to the [Repositories page](https://app.coderabbit.ai/settings/repositories) in the CodeRabbit app.
2. 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.
2. 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.
3. Select **Install Repositories**.
<div class="center-image">
Expand All
@@ -121,10 +121,12 @@ The webhook `https://coderabbit.ai/bitbucketHandler` will now be installed for t
:::note
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.
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 App Password is properly configured.
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.
:::
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.