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
Copy file name to clipboardExpand all lines: docs/platforms/bitbucket-cloud.md
+56-54Lines changed: 56 additions & 54 deletions
Original file line number
Diff line number
Diff line change
@@ -13,90 +13,90 @@ CodeRabbit integrates with Bitbucket Cloud to enhance code review and collaborat
13
13
14
14
This guide will assist you in effectively integrating CodeRabbit with Bitbucket Cloud.
15
15
16
-
## Configure App Password
16
+
## Configure API Token
17
17
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
19
+
necessary permissions for interacting with the Bitbucket merge request and discussion APIs.
19
20
20
21
1. Create a new Bitbucket account specifically for CodeRabbit and treat it as a service account.
21
22
2. Name the account "CodeRabbit".
22
-
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
+
3. If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this
24
+
new account.
25
+
4. Generate an API Token to enable seamless integration between CodeRabbit and your Bitbucket repositories.
24
26
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.
We recommend creating a new user as a service account, associating this user to the workspace you'd like to install
28
+
CodeRabbit on, and providing CodeRabbit with the API token to allow access. During the installation process, CodeRabbit
29
+
will automatically configure the required webhook for seamless integration.
34
30
35
31
:::note
36
32
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.
33
+
If you wish to change the review user, you must provide the API token for the new user who will post reviews and
34
+
comments. However, this requires manually removing the previous user from the projects and associated webhooks. Once
35
+
this is done, you will need to reinstall the CodeRabbit app for each project.
38
36
39
37
:::
40
38
41
39
### Recommendations
42
40
43
-
-**Create a dedicated user for CodeRabbit** - This ensures the user is exclusively for CodeRabbit, allowing better access control.
41
+
-**Create a dedicated user for CodeRabbit** - This ensures the user is exclusively for CodeRabbit, allowing better
42
+
access control.
44
43
-**Use "CodeRabbit" as the username** - This makes the user easily recognizable for future reference.
45
44
-**Use a dedicated email address** - This helps in easy identification and management.
46
-
-**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").
47
-
-**Developer Access** Ensure the service account user has developer access to the projects that you wish to install CodeRabbit on.
45
+
-**Use the CodeRabbit logo as the profile picture** - This further ensures easy recognition. You can download our logo
46
+
from [here](/img/integrations/logo.svg"download").
47
+
-**Developer Access** Ensure the service account user has developer access to the projects that you wish to install
48
+
CodeRabbit on.
48
49
49
50
#### Key Points to Remember
50
51
51
-
- Code reviews will be attributed to the owner of the app password.
52
+
- Code reviews will be attributed to the owner of the API token.
52
53
53
-
#### Generating an App password
54
+
#### Generating an API token
54
55
55
-
Bitbucket provides an option to generate an app password for a new user. Follow these steps to generate the password:
56
+
Bitbucket provides an option to generate an API token for a new user. Follow these steps to generate the token:
56
57
57
-
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.
58
+
1. Log in using the user designated for CodeRabbit reviews. This user serves as a service account for managing reviews
59
+
and related activities.
60
+
2. Go to [API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens).
61
+
3. Click **Create API token with scopes**.
62
+
4. Enter a name easily recognizable for this API token usage and an expiration date based on your plan of using the
63
+
product.
64
+
5. On next step select **Bitbucket**
62
65
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
66
+
- read:account
67
+
- read:user:bitbucket
68
+
- write:issue:bitbucket
69
+
- read:issue:bitbucket
70
+
- read:workspace:bitbucket
71
+
- admin:project:bitbucket
72
+
- write:webhook:bitbucket
73
+
- read:webhook:bitbucket
74
+
- read:pipeline:bitbucket
75
+
- read:runner:bitbucket
76
+
- read:repository:bitbucket
77
+
- write:repository:bitbucket
78
+
- read:pullrequest:bitbucket
79
+
- write:pullrequest:bitbucket
72
80
7. Click **Create**
73
-
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.
87
82
88
-
### Where to Provide CodeRabbit the App Password
83
+
### Where to Provide CodeRabbit the API Token
89
84
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.
85
+
By default, if no API token is provided, CodeRabbit will prompt you to provide one during the installation process.
86
+
However, if you wish to provide the token beforehand, you can do so by navigating to the **Organization Settings** tab,
87
+
and selecting the **Bitbucket User** tab on the sidebar. Once entering the API token, the token will be validated and
88
+
saved for future use.
91
89
92
-
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.
90
+
You can confirm the correct user is being selected by verifying the user ID shown on the UI with the user ID of the
91
+
service account user you created.
93
92
94
93
---
95
94
96
95
### Installing CodeRabbit into your Bitbucket Repositories
97
96
98
97
1. Go to the [Repositories page](https://app.coderabbit.ai/settings/repositories) in the CodeRabbit app.
99
-
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.
98
+
2. Select the checkbox next to the repositories where you want to install CodeRabbit. To install it on all repositories
99
+
at once, select the checkbox at the top.
100
100
3. Select **Install Repositories**.
101
101
102
102
<divclass="center-image">
@@ -121,10 +121,12 @@ The webhook `https://coderabbit.ai/bitbucketHandler` will now be installed for t
121
121
122
122
:::note
123
123
124
-
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.
124
+
If you are experiencing issues with the webhook, such as CodeRabbit not being able to access the repository, or not
125
+
reviewing pull requests, you can manually delete the webhook to the repository.
125
126
126
127
Then refresh the repository page in the CodeRabbit app and you can reinstall the webhook.
127
128
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.
129
+
If you cannot install the webhook please check that your Bitbucket user has the necessary permissions to install the
0 commit comments