diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-10 18:09:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-10 18:09:14 +0300 |
commit | ff06f859cdabec3c874c004f93fe5082aeacf917 (patch) | |
tree | 5269b37a4cd5181869267e3ce9ece4d11518752b /qa | |
parent | a08f8baa63c0aea7fcf969da40d30e6cf56365cc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/tools/delete_subgroups.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/qa/qa/tools/delete_subgroups.rb b/qa/qa/tools/delete_subgroups.rb index a05ec735632..903f730a030 100644 --- a/qa/qa/tools/delete_subgroups.rb +++ b/qa/qa/tools/delete_subgroups.rb @@ -2,9 +2,9 @@ require_relative '../../qa' -# This script deletes all subgroups of a group specified by ENV['GROUP_NAME_OR_PATH'] +# This script deletes all subgroups of a group specified by ENV['TOP_LEVEL_GROUP_NAME'] # Required environment variables: GITLAB_QA_ACCESS_TOKEN and GITLAB_ADDRESS -# Optional environment variable: GROUP_NAME_OR_PATH (defaults to 'gitlab-qa-sandbox-group') +# Optional environment variable: TOP_LEVEL_GROUP_NAME (defaults to 'gitlab-qa-sandbox-group') # Run `rake delete_subgroups` module QA @@ -47,8 +47,9 @@ module QA end def fetch_group_id - group_search_response = get Runtime::API::Request.new(@api_client, "/groups", search: ENV['GROUP_NAME_OR_PATH'] || 'gitlab-qa-sandbox-group').url - JSON.parse(group_search_response.body).first["id"] + group_name = ENV['TOP_LEVEL_GROUP_NAME'] || 'gitlab-qa-sandbox-group' + group_search_response = get Runtime::API::Request.new(@api_client, "/groups/#{group_name}" ).url + JSON.parse(group_search_response.body)["id"] end def fetch_subgroup_ids(group_id, group_pages) |