Skip to content

Fix delete_user_projects QA rake task to accept args

Dan Davison requested to merge dj-fix-delete_user_projects-task into master

What does this MR do and why?

When using rake to execute this task, the DeleteUserProjects class would raise an ArgumentError exception, complaining that Rake was passing too many arguments.

This fixes this discrepancy.

Examples

** Delete user projects starting from tomorrow (no dry-run) **

$ GITLAB_ADDRESS=<address> GITLAB_QA_ACCESS_TOKEN=<token> USER_ID=<id> \
    bundle exec delete_user_projects

** Delete user projects starting from today (no dry-run) **

$ GITLAB_ADDRESS=<address> GITLAB_QA_ACCESS_TOKEN=<token> USER_ID=<id> \
    bundle exec "delete_user_projects[2023-10-26,]"

Perform a dry-run of which projects would be deleted starting from yesterday [default]

$ GITLAB_ADDRESS=<address> GITLAB_QA_ACCESS_TOKEN=<token> USER_ID=<id> \
    bundle exec "delete_user_projects[,true]"

MR acceptance checklist

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

Merge request reports