Skip to content
Snippets Groups Projects

[BE] Provide script to run on console for bulk assignment

Merged Mohamed Hamda requested to merge 431619-script-draft into master
Files
8
@@ -178,20 +178,20 @@ sudo /etc/init.d/gitlab start
```
## Code Suggestions Rake Task
## Bulk assign users to GitLab Duo Pro
To perform bulk user assignment for Code Suggestions, you can use the following Rake task:
To perform bulk user assignment for GitLab Duo Pro, you can use the following Rake task:
```shell
bundle exec rake code_suggestions:bulk_user_assignment CODE_SUGGESTIONS_BULK_USER_FILE_PATH=path/to/your/file.csv
bundle exec rake duo_pro:bulk_user_assignment DUO_PRO_BULK_USER_FILE_PATH=path/to/your/file.csv
```
If you prefer to use square brackets in the file path, you can escape them or use double quotes:
```shell
bundle exec rake code_suggestions:bulk_user_assignment\['path/to/your/file.csv'\]
bundle exec rake duo_pro:bulk_user_assignment\['path/to/your/file.csv'\]
# or
bundle exec rake "code_suggestions:bulk_user_assignment['path/to/your/file.csv']"
bundle exec rake "duo_pro:bulk_user_assignment['path/to/your/file.csv']"
```
The CSV file should have the following format:
@@ -207,13 +207,11 @@ etc..
Ensure that the file contains a header named `username`, and each subsequent row represents a username for user assignment.
Error Messages:
The task might raise the following error messages:
The task may raise the following error messages:
- `User is not found`: Indicates that the specified user was not found.
- `ERROR_NO_SEATS_AVAILABLE`: Indicates that no more seats are available for user assignment.
- `ERROR_INVALID_USER_MEMBERSHIP`: Indicates that the user is not eligible for assignment due to being inactive, a bot, or a ghost.
- `User is not found`: The specified user was not found.
- `ERROR_NO_SEATS_AVAILABLE`: No more seats are available for user assignment.
- `ERROR_INVALID_USER_MEMBERSHIP`: The user is not eligible for assignment due to being inactive, a bot, or a ghost.
## Related topics
Loading