Skip to content

Add `default_branch` attribute to Groups API

What does this MR do and why?

Contributes to #442298 (closed)

Problem

We allow to set default_branch for group level via UI. However, this functionality is not supported by the REST API.

Solution

Allow to provide default_branch attribute to Groups API.

How to set up and validate locally

  1. Visit http://gdk.test:3000/api/v4/groups/22
  2. You should see a new field default_branch in the json response
  3. Update the field with a new value curl --request PUT --header "PRIVATE-TOKEN: <private-token>" --header "Content-Type: application/json" "http://127.0.0.1:3000/api/v4/groups/22" --data '{"default_branch": "test"}'
  4. Visit http://gdk.test:3000/api/v4/groups/22 again
  5. You should see an updated value in default_branch field
Edited by Vasilii Iakliushin

Merge request reports