Fix: Remove shared_runners_setting attribute from groups creation API
What does this MR do and why?
Fix: Allow shared_runners_setting attribute only for groups update API
Changelog: fixed
References
How to set up and validate locally
- Run GDK.
- Confirm it succeeds to create a new group with
shared_runners_settingattribute. This should succeed without error message, because Rails ignores invalid params and this is consistent with other API endpoints.
$ curl -k -X POST "https://gdk.test:3443/api/v4/groups?path=issue-586605-group-4" \
-H "Authorization: Bearer $PAT" \
-H "Content-Type: application/json" \
-d '{
"name": "586605-group-2",
"visibility": "private",
"share_with_group_lock": true,
"shared_runners_setting": "invalid_value"
}'
Response includes:
{
"id":201,
"web_url":"https://gdk.test:3443/groups/issue-586605-group-4",
...
"shared_runners_setting":"enabled",
...
}
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Taka Nishida