Commit 9ec6714
authored
feat(bitbucket): add API token authentication support and deprecate A… (#8604)
* feat(bitbucket): add API token authentication support and deprecate App passwords
- Updated Bitbucket connection model to include `UsesApiToken` field for API token support.
- Modified connection handling in the Bitbucket API to use API tokens.
- Added migration script to update existing connections for backward compatibility.
- Updated UI to reflect changes in authentication method and provide guidance on API token usage.
- Updated documentation to inform users about the deprecation of App passwords.
* test(bitbucket): add unit tests for API token authentication and connection handling
- Introduced tests for Bitbucket connection API, validating API token and app password authentication methods.
- Added tests for connection sanitization to ensure sensitive data is handled correctly.
- Implemented tests for connection status code handling and deprecation warnings for app passwords.
- Enhanced coverage for connection merging logic and authentication setup.
Addresses #8520
* fix(lint): resolve multiple linting issues
The following issues were resolved:
- SA1006 in `server/api/shared/api_output.go`: Changed `fmt.Errorf` to `errors.Default.New` and removed unused `fmt` import.
- gofmt in `plugins/bitbucket/models/migrationscripts/20251001_add_api_token_auth.go`: Fixed trailing blank line.
- gofmt in `plugins/bitbucket/api/connection_api.go`: Corrected inconsistent tab spacing.
- confusing-results in `server/services/remote/plugin/plugin_impl.go`: Added named return parameters and resolved variable shadowing.
- ST1016 in `plugins/bitbucket/models/connection.go`: Standardized receiver name from `connection` to `bc`.
- S1009 in `plugins/github_graphql/tasks/issue_extractor.go`: Removed redundant nil check.
- superfluous-else in `impls/logruslog/init.go`: Refactored code to eliminate unnecessary else block.
- superfluous-else in `helpers/srvhelper/scope_service_helper.go`: Refactored code to eliminate unnecessary else block.
Fixes #85201 parent 794f8ef commit 9ec6714
File tree
22 files changed
+993
-102
lines changed- backend
- helpers/srvhelper
- impls/logruslog
- plugins
- bitbucket
- api
- models
- migrationscripts
- github_graphql/tasks
- server
- services/remote/plugin
- config-ui
- public/onboard/step-2
- src
- plugins/register/bitbucket
- connection-fields
- release
- routes
- onboard
- project/home
22 files changed
+993
-102
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
| 272 | + | |
272 | 273 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
285 | 285 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
292 | 292 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
300 | 300 | | |
301 | | - | |
302 | | - | |
303 | 301 | | |
| 302 | + | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
77 | 76 | | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| |||
0 commit comments