Add Bitbucket Cloud Import API token support

What does this MR do and why?

This MR adds bitbucket cloud import API by API tokens. Atlassian announced deprecation of 'app passwords' and replacing them with API tokens, so I am adding support for that. Not removing app passwords yet as that needs to go through deprecation process.

References

#575583 (closed)

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Enable bitbucket cloud importer in admin settings
  2. Create project on bitbucket cloud
  3. Get bitbucket API token at https://id.atlassian.com/manage-profile/security/api-tokens
  4. Select "Create API token with scopes" and select every scope
  5. Run the http request to import the project from bitbucket

POST http://gdk.test:3000/api/v4/import/bitbucket
Content-Type: application/json
PRIVATE-TOKEN: ...

{
  "bitbucket_email": "...@gitlab.com",
  "bitbucket_api_token": "...",
  "repo_path": "repo/path",
  "target_namespace": "root"
}

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Carla Drago

Merge request reports

Loading