feat(members): add commands to manage project members
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
Description
Two main commands:
-
glab repo members add- Add members to a project -
glab repo members remove- Remove members from a project
Core Functionality:
- Add Command: Allows adding users by username or user ID with configurable access levels (guest, reporter, developer, maintainer, owner) and optional expiration dates
- Remove Command: Enables removing project members by username or user ID
- Access Level Support: Implements all GitLab permission levels with clear numeric mappings
- Flexible User Input: Supports both username and user ID for member identification
Related Issues
Resolves ##7299 (closed)
How has this been tested?
- Extensive unit tests for both add and remove commands
- HTTP mocking for API interactions
- Test data files for various scenarios
- Edge case coverage (invalid inputs, user not found, etc.)
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap
Closes #7299 (closed)
Edited by Swapnaneel Patra