@@ -13,24 +13,24 @@ 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 Api Token
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
19
- 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.
20
20
21
21
1 . Create a new Bitbucket account specifically for CodeRabbit and treat it as a service account.
22
22
2 . Name the account "CodeRabbit".
23
23
3 . If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this
24
24
new account.
25
- 4 . Generate an Api Token to enable seamless integration between CodeRabbit and your Bitbucket repositories.
25
+ 4 . Generate an API Token to enable seamless integration between CodeRabbit and your Bitbucket repositories.
26
26
27
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
28
+ CodeRabbit on, and providing CodeRabbit with the API token to allow access. During the installation process, CodeRabbit
29
29
will automatically configure the required webhook for seamless integration.
30
30
31
31
::: note
32
32
33
- If you wish to change the review user, you must provide the api token for the new user who will post reviews and
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
34
comments. However, this requires manually removing the previous user from the projects and associated webhooks. Once
35
35
this is done, you will need to reinstall the CodeRabbit app for each project.
36
36
@@ -49,50 +49,42 @@ this is done, you will need to reinstall the CodeRabbit app for each project.
49
49
50
50
#### Key Points to Remember
51
51
52
- - Code reviews will be attributed to the owner of the api token.
52
+ - Code reviews will be attributed to the owner of the API token.
53
53
54
- #### Generating an Api token
54
+ #### Generating an API token
55
55
56
- Bitbucket provides an option to generate an api token for a new user. Follow these steps to generate the token:
56
+ Bitbucket provides an option to generate an API token for a new user. Follow these steps to generate the token:
57
57
58
58
1 . Log in using the user designated for CodeRabbit reviews. This user serves as a service account for managing reviews
59
59
and related activities.
60
- 2 . Go to [ " API Tokens Settings" ] ( https://id.atlassian.com/manage-profile/security/api-tokens ) .
60
+ 2 . Go to [ API Tokens] ( https://id.atlassian.com/manage-profile/security/api-tokens ) .
61
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
62
+ 4 . Enter a name easily recognizable for this API token usage and an expiration date based on your plan of using the
63
63
product.
64
64
5 . On next step select ** Bitbucket**
65
65
6 . Ensure the following scopes are selected:
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.
82
-
83
- <div class =" center-image " >
84
- <img
85
- src="/img/integrations/bitbucket-api-token-scopes.png"
86
- alt="Bitbucket API token scopes"
87
- width="1000"
88
- />
89
- </div >
90
-
91
- ### Where to Provide CodeRabbit the Api Token
92
-
93
- By default, if no api token is provided, CodeRabbit will prompt you to provide one during the installation process.
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
80
+ 7 . Click ** Create**
81
+ 8 . Note down the API token as it will only be displayed once.
82
+
83
+ ### Where to Provide CodeRabbit the API Token
84
+
85
+ By default, if no API token is provided, CodeRabbit will prompt you to provide one during the installation process.
94
86
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
87
+ and selecting the ** Bitbucket User** tab on the sidebar. Once entering the API token, the token will be validated and
96
88
saved for future use.
97
89
98
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
@@ -135,6 +127,6 @@ reviewing pull requests, you can manually delete the webhook to the repository.
135
127
Then refresh the repository page in the CodeRabbit app and you can reinstall the webhook.
136
128
137
129
If you cannot install the webhook please check that your Bitbucket user has the necessary permissions to install the
138
- webhook and the Api Token is properly configured.
130
+ webhook and the API Token is properly configured.
139
131
140
132
:::
0 commit comments