Skip to content

Remove add_members_to_projects from ProjectMember

Abdul Wadood requested to merge 390926-remove-add_members_to_projects into master

What does this MR do and why?

This work forms part of our effort to remove duplication of code between GroupMember and ProjectMember as we consolidate to a single Member class.

add_members_to_projects has been removed from ProjectMember to reduce project-specific code and Members::CreatorService now accepts the sources param as a single source, an active record relation, or an array of sources.

How to set up and validate locally

To validate locally you can run the following rake tasks to add every user to every project or add a given user to every project:

bundle exec rake gitlab:import:all_users_to_all_projects
bundle exec rake "gitlab:import:user_to_projects[<user-email-id>]"

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #390926 (closed)

Merge request reports