Move MentionsConverter to Import namespace
What does this MR do and why?
This is the first step in mapping GitHub PR mentions by username on import. Moving these BitbucketServer
classes into a generic namespace means they can be used by other importers more cleanly.
I thought it best to do these changes first, to ensure nothing with the BitBucket Server import fails.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Disable the feature flag
Feature.disable(:bitbucket_server_convert_mentions_to_users)
- Setup bitbucket server by following these instructions
- Create another user at http://localhost:7990/admin/users with email
john@gmail.com
and usernamedoe
. Add any (read/write/admin) permission for this user to access the project. - Create a project and repo, push up changes and create a pull request. Mention
@doe
in the pull request description and create a note with a mention. - On gdk, create a user with email
janedoe@gmail.com
and usernamedoe
- Import the project from bitbucket server
- Go to the MR and see that the note/description has an
@mention
linking to Jane's profile - Enable the feature flag
Feature.enable(:bitbucket_server_convert_mentions_to_users)
- Delete the project (so that we can import again)
Projects::DestroyService.new(Project.last, User.first, {}).execute
- Import the project again and see that the MR now does not have an
@mention
for Jane. - Optionally repeat the process with:
- On gitlab, update Jane's email to
john@gmail.com
-> link to Jane's profile - On BBS, remove John's access to the project -> does not have a link to a user profile
- On gitlab, delete Jane's user -> does not have a link to a user profile
- On gitlab, update Jane's email to
Related to #436320 (closed)
Edited by Carla Drago
Merge request reports
Activity
Please register or sign in to reply