Skip to content

Commit 7bfeea9

Browse files
Update Bitbucket docs with latest api token changes
1 parent 5b85004 commit 7bfeea9

File tree

2 files changed

+33
-41
lines changed

2 files changed

+33
-41
lines changed

docs/platforms/bitbucket-cloud.md

Lines changed: 33 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,20 @@ CodeRabbit integrates with Bitbucket Cloud to enhance code review and collaborat
1313

1414
This guide will assist you in effectively integrating CodeRabbit with Bitbucket Cloud.
1515

16-
## Configure App Password
16+
## Configure Api Token
1717

18-
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.
18+
To enable CodeRabbit to interact with your Bitbucket repositories, an api token is required. This token grants the necessary permissions for interacting with the Merge Requests and Discussions APIs.
1919

2020
1. Create a new Bitbucket account specifically for CodeRabbit and treat it as a service account.
2121
2. Name the account "CodeRabbit".
2222
3. If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this new account.
23-
4. Generate an App Password to enable seamless integration between CodeRabbit and your Bitbucket repositories.
23+
4. Generate an Api Token to enable seamless integration between CodeRabbit and your Bitbucket repositories.
2424

25-
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.
26-
27-
<div class="center-image">
28-
<img
29-
src="/img/integrations/bitbucket-app-password-modal.png"
30-
alt="Bitbucket user modal"
31-
width="1000"
32-
/>
33-
</div>
25+
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.
3426

3527
:::note
3628

37-
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.
29+
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.
3830

3931
:::
4032

@@ -48,46 +40,46 @@ If you wish to change the review user, you must provide the app password for the
4840

4941
#### Key Points to Remember
5042

51-
- Code reviews will be attributed to the owner of the app password.
43+
- Code reviews will be attributed to the owner of the api token.
5244

53-
#### Generating an App password
45+
#### Generating an Api token
5446

55-
Bitbucket provides an option to generate an app password for a new user. Follow these steps to generate the password:
47+
Bitbucket provides an option to generate an api token for a new user. Follow these steps to generate the token:
5648

5749
1. Log in using the user designated for CodeRabbit reviews. This user serves as a service account for managing reviews and related activities.
58-
2. Go to "Personal Bitbucket Settings".
59-
3. Choose **App passwords**.
60-
4. Click **Create app password**.
61-
5. Enter a label easily recognizable for this app passwords usage.
50+
2. Go to ["API Tokens Settings"](https://id.atlassian.com/manage-profile/security/api-tokens).
51+
3. Click **Create API token with scopes**.
52+
4. Enter a name easily recognizable for this api token usage and an expiration date based on your plan of using the product.
53+
5. On next step select **Bitbucket**
6254
6. Ensure the following scopes are selected:
63-
1. Account - Read
64-
2. Issues - Write
65-
3. Workspace membership - Read
66-
4. Projects - Write
67-
5. Repositories - Write
68-
6. Pull requests - Write
69-
7. Webhooks - Read and write
70-
8. Pipelines - Read
71-
9. Runners - Read
55+
1. read:account
56+
2. read:user:bitbucket
57+
3. write:issue:bitbucket
58+
4. read:issue:bitbucket
59+
5. read:workspace:bitbucket
60+
6. admin:project:bitbucket
61+
7. write:webhook:bitbucket
62+
8. read:webhook:bitbucket
63+
9. read:pipeline:bitbucket
64+
10. read:runner:bitbucket
65+
11. read:repository:bitbucket
66+
12. write:repository:bitbucket
67+
13. read:pullrequest:bitbucket
68+
14. write:pullrequest:bitbucket
7269
7. Click **Create**
73-
8. Note down the app password as it will only be displayed once.
70+
8. Note down the api token as it will only be displayed once.
7471

7572
<div class="center-image">
7673
<img
77-
src="/img/integrations/bitbucket-app-password-page.png"
78-
alt="Bitbucket app password configuration page"
79-
/>
80-
</div>
81-
<div class="center-image">
82-
<img
83-
src="/img/integrations/bitbucket-app-password-permissions.png"
84-
alt="Bitbucket app password permissions"
74+
src="/img/integrations/bitbucket-api-token-scopes.png"
75+
alt="Bitbucket API token scopes"
76+
width="1000"
8577
/>
8678
</div>
8779

88-
### Where to Provide CodeRabbit the App Password
80+
### Where to Provide CodeRabbit the Api Token
8981

90-
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.
82+
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.
9183

9284
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.
9385

@@ -125,6 +117,6 @@ If you are experiencing issues with the webhook, such as CodeRabbit not being ab
125117

126118
Then refresh the repository page in the CodeRabbit app and you can reinstall the webhook.
127119

128-
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.
120+
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.
129121

130122
:::
Loading

0 commit comments

Comments
 (0)