Allow subgroup deletion total-pages is unknown
What does this MR do and why?
The x-total-pages
header isn't returned if there are more than 10000 records, which is currently the case in https://gitlab.com/gitlab-qa-sandbox-group, causing a test to fail when it tries to filter a list of all the subgroups: #341930 (closed).
The x-next-page
header is always returned, so we'll use that instead and stop fetching pages when there's no longer a next one.
How to set up and validate locally
export GITLAB_ADDRESS=https://gitlab.com
export GITLAB_QA_ACCESS_TOKEN=<PAT for user with access to gitlab-qa-sandbox-group>
bundle exec rake delete_subgroups
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Mark Lapierre