github.com/sharovik/devbot@v1.0.1-0.20240308094637-4a0387c40516/documentation/bitbucket_client_configuration.md (about) 1 # BitBucket client configuration 2 For this you need to do the following steps: 3 1. Go to your workspace settings in bitbucket.org 4 2. Under the **APPS AND FEATURES** section you will find `OAuth`, please go there 5 3. In the OAuth page you will find `OAuth consumers`. Please add new consumer with the following checked permissions: 6 - Pull requests: Read, Write 7 - Repositories: Read, Write 8 - Pipelines: Read 9 And also please mark this consumer as "Private". 10 See example of the filled form: 11  12 13 4. After form submit you will receive the client credentials, please use them to fill these attributes in your `.env` file: 14 ``` 15 BITBUCKET_CLIENT_ID= 16 BITBUCKET_CLIENT_SECRET= 17 ``` 18 19 ## Prepare required reviewers 20 This will be used in the pull-request checks and for release pull-request creation 21 1. Please go to BitBucket profile page of the reviewer and copy the UUID from the url. There should be something like this: 22 `https://bitbucket.org/%7Bsome-bitbucket-uuid-is-here%7D/`. From that string you take the UUID and put it in curly brace `{some-bitbucket-uuid-is-here}` 23 2. In the slack, please find the related member and get his member ID. Just view the profile, click to the options button and you will find the member id there. 24 See example: 25  26 Click to copy this member ID 27 3. Add the reviewers into `BITBUCKET_REQUIRED_REVIEWERS` attribute in the `.env` with the following structure: 28 ``` 29 BITBUCKET_REQUIRED_REVIEWERS=SLACK-MEMBER-ID1:{some-bitbucket-uuid-is-here1},SLACK-MEMBER-ID1:{some-bitbucket-uuid-is-here2} 30 ``` 31 As you can see, you can add multiple reviewers by using comma. 32 33 ## Prepare current user UUID 34 This will be used during the release pull-request creation. The current user cannot add into reviewers of his pull-request him-self. To prevent this we need to understand which UUID is the UUDI of current consumer. 35 1. Please go to your BitBucket profile page and copy the UUID from the url. There should be something like this: `https://bitbucket.org/%7Bsome-bitbucket-uuid-is-here%7D/`. From that string you take the UUID and put it in curly brace `{some-bitbucket-uuid-is-here}` 36 2. Put the value into `BITBUCKET_USER_UUID` attribute 37 ``` 38 BITBUCKET_USER_UUID={some-bitbucket-uuid-is-here} 39 ``` 40 41 ## [Optional] Release status update in the selected channel 42 This option will everyone in selected channel about the release status update 43 To enable this option you need to do the following steps: 44 1. Set `BITBUCKET_RELEASE_CHANNEL_MESSAGE_ENABLE` to `true` 45 ``` 46 BITBUCKET_RELEASE_CHANNEL_MESSAGE_ENABLE=true 47 ``` 48 2. Set the slack channel ID. Go to selected channel in slack, select the message from this channel and try to share it. In the popup you will see `Copy link` button. Copy the link and extract from this link the `CHANNEL-ID` part 49 Example: `https://you-team.slack.com/archives/CHANNEL-ID/p1574500945000200`. Usually the channel ID starts from `C`. 50 51  52 3. Put the channel ID into `BITBUCKET_RELEASE_CHANNEL` variable in your `.env` file 53 ``` 54 BITBUCKET_RELEASE_CHANNEL=CHANNEL-ID 55 ```