Fix the project ID query param
What does this MR do?
Related #254308 (closed)
The endpoint for downloading a group coverage CSV report should look like this:
https://gitlab.com/groups/gitlab-org/-/analytics/coverage_reports.csv?ref_path=refs%2Fheads%2Fmaster&start_date=2020-08-22&end_date=2020-09-21&project_ids[]=<id>&project_ids[]=<id>
Note that the project_ids
parameter takes the param[]=value¶m[]=value
approach.
Currently this feature is creating the endpoint to be like this:
https://gitlab.com/groups/gitlab-org/-/analytics/coverage_reports.csv?ref_path=refs%2Fheads%2Fmaster&start_date=2020-08-22&end_date=2020-09-21&project_ids=<id>,<id>
Where the IDs are comma separated in the same parameter.
This causes the query parameter to be useless and the endpoint just returns the report for all of the projects in the group.
This MR switches to the correct form for the project_ids
array param.
Also I removed the includeSubgroups
because there are name conflicts that make the list confusing for users. We may be able to include them again in the future, but for now this is the most boring solution.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines - [-] Style guides
- [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done