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
+48-30Lines changed: 48 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -15,28 +15,37 @@ This guide will assist you in effectively integrating CodeRabbit with Bitbucket
15
15
16
16
## Configure Api Token
17
17
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.
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 Merge Requests and Discussions 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
+
3. If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this
24
+
new account.
23
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 api token to allow access. During the installation process, CodeRabbit will automatically configure the required webhook for seamless integration.
27
+
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.
26
30
27
31
:::note
28
32
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.
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.
30
36
31
37
:::
32
38
33
39
### Recommendations
34
40
35
-
-**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.
36
43
-**Use "CodeRabbit" as the username** - This makes the user easily recognizable for future reference.
37
44
-**Use a dedicated email address** - This helps in easy identification and management.
38
-
-**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").
39
-
-**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.
40
49
41
50
#### Key Points to Remember
42
51
@@ -46,28 +55,30 @@ If you wish to change the review user, you must provide the api token for the ne
46
55
47
56
Bitbucket provides an option to generate an api token for a new user. Follow these steps to generate the token:
48
57
49
-
1. Log in using the user designated for CodeRabbit reviews. This user serves as a service account for managing reviews and related activities.
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.
50
60
2. Go to ["API Tokens Settings"](https://id.atlassian.com/manage-profile/security/api-tokens).
51
61
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.
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.
53
64
5. On next step select **Bitbucket**
54
65
6. Ensure the following scopes are selected:
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
69
-
7. Click **Create**
70
-
8. Note down the api token as it will only be displayed once.
66
+
7. read:account
67
+
8. read:user:bitbucket
68
+
9. write:issue:bitbucket
69
+
10. read:issue:bitbucket
70
+
11. read:workspace:bitbucket
71
+
12. admin:project:bitbucket
72
+
13. write:webhook:bitbucket
73
+
14. read:webhook:bitbucket
74
+
15. read:pipeline:bitbucket
75
+
16. read:runner:bitbucket
76
+
17. read:repository:bitbucket
77
+
18. write:repository:bitbucket
78
+
19. read:pullrequest:bitbucket
79
+
20. write:pullrequest:bitbucket
80
+
21. Click **Create**
81
+
22. Note down the api token as it will only be displayed once.
71
82
72
83
<divclass="center-image">
73
84
<img
@@ -79,16 +90,21 @@ Bitbucket provides an option to generate an api token for a new user. Follow the
79
90
80
91
### Where to Provide CodeRabbit the Api Token
81
92
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.
93
+
By default, if no api token is provided, CodeRabbit will prompt you to provide one during the installation process.
94
+
However, if you wish to provide the token beforehand, you can do so by navigating to the **Organization Settings** tab,
95
+
and selecting the **Bitbucket User** tab on the sidebar. Once entering the api token, the token will be validated and
96
+
saved for future use.
83
97
84
-
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.
98
+
You can confirm the correct user is being selected by verifying the user ID shown on the UI with the user ID of the
99
+
service account user you created.
85
100
86
101
---
87
102
88
103
### Installing CodeRabbit into your Bitbucket Repositories
89
104
90
105
1. Go to the [Repositories page](https://app.coderabbit.ai/settings/repositories) in the CodeRabbit app.
91
-
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.
106
+
2. Select the checkbox next to the repositories where you want to install CodeRabbit. To install it on all repositories
107
+
at once, select the checkbox at the top.
92
108
3. Select **Install Repositories**.
93
109
94
110
<divclass="center-image">
@@ -113,10 +129,12 @@ The webhook `https://coderabbit.ai/bitbucketHandler` will now be installed for t
113
129
114
130
:::note
115
131
116
-
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.
132
+
If you are experiencing issues with the webhook, such as CodeRabbit not being able to access the repository, or not
133
+
reviewing pull requests, you can manually delete the webhook to the repository.
117
134
118
135
Then refresh the repository page in the CodeRabbit app and you can reinstall the webhook.
119
136
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.
137
+
If you cannot install the webhook please check that your Bitbucket user has the necessary permissions to install the
0 commit comments