@@ -13,24 +13,24 @@ CodeRabbit integrates with Bitbucket Cloud to enhance code review and collaborat
1313
1414This guide will assist you in effectively integrating CodeRabbit with Bitbucket Cloud.
1515
16- ## Configure Api Token
16+ ## Configure API Token
1717
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.
2020
21211 . Create a new Bitbucket account specifically for CodeRabbit and treat it as a service account.
22222 . Name the account "CodeRabbit".
23233 . If your Bitbucket workspace requires two-step verification, then you must also enable two-step verification on this
2424 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.
2626
2727We 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
2929will automatically configure the required webhook for seamless integration.
3030
3131::: note
3232
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
3434comments. However, this requires manually removing the previous user from the projects and associated webhooks. Once
3535this is done, you will need to reinstall the CodeRabbit app for each project.
3636
@@ -49,50 +49,42 @@ this is done, you will need to reinstall the CodeRabbit app for each project.
4949
5050#### Key Points to Remember
5151
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.
5353
54- #### Generating an Api token
54+ #### Generating an API token
5555
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:
5757
58581 . Log in using the user designated for CodeRabbit reviews. This user serves as a service account for managing reviews
5959 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 ) .
61613 . 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
6363 product.
64645 . On next step select ** Bitbucket**
65656 . 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.
9486However, 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
9688saved for future use.
9789
9890You 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.
135127Then refresh the repository page in the CodeRabbit app and you can reinstall the webhook.
136128
137129If 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.
139131
140132:::
0 commit comments