Bitbucket Server import: Search for approvers by email and username
What does this MR do and why?
During Bitbucket Server import, we try to match approvals from Bitbucket with users on Gitlab so that we can create the same approvals. This is currently only finding users matching by username but we can also match by email since it is returned by the API and increases the chances of finding a user.
How to set up and validate locally
- Setup bitbucket server (not trivial but the steps can be found here) and create a pull request.
- Create another user, invite the user to the project, sign in as that user and approve the PR.
- In your rails console, create a user with the same email as the approver on Bitbucket Server (but not the same username).
- Import the project into gitlab and note that the approval is correctly imported.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #23586 (closed)
Edited by Madelein van Niekerk