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
* chore: bump Node.js in .nvmrc to v20.18.1
- Fixes [email protected] engine compatibility error:
Expected ">=20.18.1", found "16.18.1"
* docs(bitbucket): update Bitbucket configuration for API token migration
- Replace App Passwords with API Tokens as the recommended authentication method due to upcoming deprecation of App Passwords.
- Add detailed instructions for creating API tokens and required scopes.
- Include migration steps for existing App Password connections to API Tokens.
- Update images and improve clarity in the documentation.

12
12
13
13
### Step 1.1 - Authentication
14
14
@@ -20,11 +20,58 @@ Give your connection a unique name to help you identify it in the future.
20
20
21
21
For Bitbucket Cloud, you do not need to enter the REST API endpoint URL, which is always `https://api.bitbucket.org/2.0/`.
22
22
23
-
#### Username and App Password
23
+
#### Authentication Method
24
24
25
-
Learn about [how to create a Bitbucket app password](https://support.atlassian.com/bitbucket-cloud/docs/create-an-app-password/).
25
+
:::warning App Password Deprecation
26
+
Bitbucket is deprecating App passwords in favor of API tokens:
26
27
27
-
The following permissions are required to collect data from Bitbucket repositories:
28
+
-**September 9, 2025**: Creation of new App passwords will be discontinued
29
+
-**June 9, 2026**: All existing App passwords will be deactivated
30
+
31
+
**Please use API tokens for all new connections.** Existing connections using App passwords should be migrated to API tokens before June 9, 2026.
32
+
:::
33
+
34
+
You can choose between two authentication methods:
35
+
36
+
##### API Token (Recommended)
37
+
38
+
API tokens are the recommended authentication method for Bitbucket Cloud. Learn about [how to create a Bitbucket API token](https://support.atlassian.com/bitbucket-cloud/docs/create-an-api-token/).
39
+
40
+
**Steps to create an API token:**
41
+
42
+
1. Sign in at [https://id.atlassian.com/manage-profile/security/api-tokens](https://id.atlassian.com/manage-profile/security/api-tokens).
43
+
2. Select **Create API token with scopes**.
44
+
3. Give the API token a name and an expiry date (ex: 365 days), then select **Next**.
45
+
4. Select **Bitbucket** as the app and select **Next**.
46
+
5. Select the required scopes (see **Q2**) and select **Next**.
47
+
6. Review your token and select **Create token**.
48
+
7.**Copy the generated API token immediately** - it's only displayed once and can't be retrieved later.
49
+
50
+
For detailed instructions, refer to [Atlassian's API token documentation](https://support.atlassian.com/bitbucket-cloud/docs/create-an-api-token/).
51
+
52
+
**Required Scopes:**
53
+
54
+
The following scopes are **required** to collect data from Bitbucket repositories:
55
+
56
+
-`read:account` - Required to view users profiles
57
+
-`read:issue:bitbucket` - View your issues
58
+
-`read:pipeline:bitbucket` - View your pipelines
59
+
-`read:project:bitbucket` - View your projects
60
+
-`read:pullrequest:bitbucket` - View your pull requests
61
+
-`read:repository:bitbucket` - View your repositories
62
+
-`read:runner:bitbucket` - View your workspaces/repositories' runners
63
+
-`read:user:bitbucket` - View user info (required for connection test)
64
+
-`read:workspace:bitbucket` - View your workspaces
65
+
66
+

67
+
68
+
##### App Password (Deprecated)
69
+
70
+
:::caution Deprecated
71
+
App passwords are deprecated and should only be used for existing connections. For new connections, please use API tokens instead.
72
+
:::
73
+
74
+
If you're using an existing App password, learn about [how to create a Bitbucket app password](https://support.atlassian.com/bitbucket-cloud/docs/create-an-app-password/).
28
75
29
76
- Account:Read
30
77
- Workspace membership:Read
@@ -37,12 +84,10 @@ The following permissions are required to collect data from Bitbucket repositori
If you are behind a corporate firewall or VPN you may need to utilize a proxy server. Enter a valid proxy server address on your network, e.g. `http://your-proxy-server.com:1080`
44
90
45
-
46
91
#### Fixed Rate Limit (Optional)
47
92
48
93
DevLake uses a dynamic rate limit to collect Bitbucket data. You can adjust the rate limit if you want to increase or lower the speed.
@@ -51,41 +96,59 @@ The maximum rate limit for different entities in Bitbucket(Cloud) [varies from 1
Click `Test Connection`, if the connection is successful, click `Save Connection` to add the connection.
58
102
103
+
#### Migrating from App Password to API Token
104
+
105
+
If you have an existing connection using an App password and want to migrate to an API token:
106
+
107
+
1.**Create an API token** in Bitbucket (see instructions above)
108
+
2.**Edit your existing connection** in DevLake
109
+
3.**Change the Authentication Method** from "App Password" to "API Token"
110
+
4.**Enter your API token** in the token field
111
+
5.**Test the connection** to verify it works
112
+
6.**Save the connection**
113
+
114
+
Your data collection will continue without interruption, and you'll be ready for the App password deprecation in 2026.
115
+
59
116
### Step 1.2 - Add Data Scopes
60
117
61
118
Choose the Bitbucket repositories you wish to collect either by finding them in the miller column, or searching. You can only add public repositories through the search box.
The entities of which domain you wish to collect: Usually, you don't have to modify this part. However, if you don't want to collect certain Bitbucket entities, you can unselect some entities to accelerate the collection speed.
68
-
- Issue Tracking: Bitbucket issues, issue comments, etc.
69
-
- Source Code Management: Bitbucket repos, refs, commits, etc.
70
-
- Code Review: Bitbucket PRs, PR comments, etc.
71
-
- CI/CD: Bitbucket Pipelines, Bitbucket Deployments, etc.
72
-
- Cross Domain: Bitbucket users, etc.
125
+
126
+
The entities of which domain you wish to collect: Usually, you don't
127
+
have to modify this part. However, if you don't want to collect certain
128
+
Bitbucket entities, you can unselect some entities to accelerate the
129
+
collection speed.
130
+
131
+
- Issue Tracking: Bitbucket issues, issue comments, etc.
132
+
- Source Code Management: Bitbucket repos, refs, commits, etc.
133
+
- Code Review: Bitbucket PRs, PR comments, etc.
134
+
- CI/CD: Bitbucket Pipelines, Bitbucket Deployments, etc.
135
+
- Cross Domain: Bitbucket users, etc.
73
136
74
137
#### Transformations
75
138
76
139
The transformations on the Bitbucket data you are going to collect.
77
-
- The details of the transformations will be explained below.
78
-
- Without adding transformation rules, you can still view the 'Bitbucket' dashboard. However, if you want to view more pre-built dashboards, finish the transformations required.
79
-
- Each Bitbucket repo has at most ONE set of transformations.
80
140
141
+
- The details of the transformations will be explained below.
142
+
- Without adding transformation rules, you can still view the 'Bitbucket' dashboard. However, if you want to view more pre-built dashboards, finish the transformations required.
143
+
- Each Bitbucket repo has at most ONE set of transformations.
The given settings transformed the Bitbucket issue statuses to the issue statuses used by DevLake, enabling you to measure metrics like the Issue Delivery Rate on the pre-built dashboards, as DevLake understands your definition of when an issue is considered as completed (status = 'DONE').
87
150
88
-
- TODO: The issues that are planned but have not been worked on yet
151
+
- TODO: The issues that are planned but have not been worked on yet
89
152
- IN-PROGRESS: The issues that are work-in-progress
90
153
- DONE: The issues that are completed
91
154
- OTHER: Other issues statuses that do not belong to the three statuses above
@@ -97,9 +160,10 @@ The original status will be saved in the column `original_status` of the table '
97
160
DevLake will convert the issue types of 'enhancement', 'proposal', and 'task' from Bitbucket into the new issue type 'REQUIREMENT' for DevLake. In contrast, any issues classified as 'bug' in Bitbucket will be converted into the new issue type 'BUG' for DevLake. The original type will be saved in the column `original_type` of the table 'issues', and the new type will be saved in the column `type` of the same table.
98
161
99
162
###### CI/CD
163
+
100
164
The CI/CD configuration for Bitbucket is used for calculating [DORA metrics](../DORA.md).
101
165
102
-
By default, DevLake will identify the deployment and environment settings that are defined in the Bitbucket CI .yml file.
166
+
By default, DevLake will identify the deployment and environment settings that are defined in the Bitbucket CI .yml file.
@@ -118,6 +182,7 @@ If you have not defined these settings in the .yml file, please select 'Detect D
118
182
- Production: A pipeline step with a name that matches the given RegEx will be recognized as a DevLake cicd_task in the production environment.
119
183
120
184
###### Introduction to Bitbucket CI entities
185
+
121
186
Bitbucket has several key CI entities: `pipelines`, `pipeline steps`, and `deployments`. A Bitbucket pipeline contains several pipeline steps. Each pipeline step defined with a deployment key can be mapped to a Bitbucket deployment.
122
187
123
188
Each Bitbucket pipeline is converted to a cicd_pipeline in DevLake's domain layer schema and each Bitbucket pipeline step is converted to a cicd_task in DevLake's domain layer.
@@ -131,40 +196,43 @@ If a pipeline step defines `deployment` with a value (usually indicating the env
131
196
132
197
- Tags Limit: DevLake compares the last N pairs of tags to get the "commit diff', "issue diff" between tags. N defaults to 10.
133
198
134
-
- commit diff: new commits for a tag relative to the previous one
135
-
- issue diff: issues solved by the new commits for a tag relative to the previous one
199
+
- commit diff: new commits for a tag relative to the previous one
200
+
- issue diff: issues solved by the new commits for a tag relative to the previous one
136
201
137
202
- Tags Pattern: Only tags that meet the given Regular Expression will be counted.
138
203
139
204
- Tags Order: Only "reverse semver" order is supported for now.
140
205
141
206
Please click `Save` to save the transformation rules for the repo. In the data scope list, click `Next Step` to continue configuring.
142
207
143
-
144
-
145
208
## Step 2 - Collect Data in a Project
209
+
146
210
### Step 2.1 - Create a Project
211
+
147
212
Collecting Bitbucket data requires creating a project first. You can visit the Project page from the side menu and create a new project by following the instructions on the user interface.
148
213
149
214

150
215
151
216
### Step 2.2 - Add a Bitbucket Connection
217
+
152
218
You can add a previously configured Bitbucket connection to the project and select the boards for which you wish to collect the data for.
153
219
Please note: if you don't see the repositories you are looking for, please check if you have added them to the connection first.
- Data Time Range: You can select the time range of the data you wish to collect. The default is set to the past six months.
160
228
- Sync Frequency: You can choose how often you would like to sync your data in this step by selecting a sync frequency option or enter a cron code to specify your preferred schedule.
161
229
- Skip Failed Tasks: sometime a few tasks may fail in a long pipeline; you can choose to skip them to avoid spending more time in running the pipeline all over again.
162
230
163
231

164
232
165
233
### Step 2.4 - Start Data Collection
166
-
Click on "Collect Data" to start collecting data for the whole project. You can check the status in the Status tab on the same page.
167
234
235
+
Click on "Collect Data" to start collecting data for the whole project. You can check the status in the Status tab on the same page.
0 commit comments