Skip to content

Standardise member add to a project

What does this MR do?

Currently, there are two main ways of adding user into a project:

project.add_master(user)

And the more array-esque technique:

project.team << [user, :master]

However, the array-esque technique feels a little less definitive in terms of the arguments passed. Using a function will enforce the caller to abide with the method's signature, thus more clearer.

Last but not least, now the << method is removed, thus enforcing future developer to use add_* method.

Are there points in the code the reviewer needs to double check?

Yes

Why was this MR needed?

To standardise the way user is added into a project

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Merge request reports