Implement User Contribution Mapping for Bitbucket Cloud importer
Add User Contribution Mapping support to the Bitbucket Cloud importer. Bitbucket Cloud is the last major third-party importer that does not currently implement improved user contribution mapping and still requires user management prior to import. Implementing improved user contribution mapping in the Bitbucket Cloud importer would bring all the benefits of user mapping to Bitbucket Cloud imports and make the user experience consistent with our Bitbucket Server, GitHub, and Gitea importers.
The implementation should follow the existing source user mapping patterns used in the GitHub and Bitbucket Server importers, including creating source user records, pushing placeholder references for imported objects not supported by direct reassignment, and enabling the reassignment workflow.
Implementation suggestions
- In general, follow the user contribution implementation patters in the Bitbucket Server importer
- Create a new WIP feature flag to implement in multiple, small MRs. The feature flag state should be checked in
BitbucketImport::ProjectCreatorand stored in the project'simport_dataattribute. SeeBitbucketServerImport::ProjectCreatoras an example - Source user mapping should be implemented in
BitbucketImport::UserFinder. UseBitbucketServerImport::UserFinderas an example - Include
Import::PlaceholderReferences::Pusherin object importers (e.g.BitbucketImport::Importers::PullRequestImporterand use one of the availablepush_methods depending on the object saved. These methods should already handle checking direct reassignment compatibility.