diff --git a/groups.go b/groups.go index b3535ef72..172a5f767 100644 --- a/groups.go +++ b/groups.go @@ -71,6 +71,7 @@ type Group struct { LDAPCN string `json:"ldap_cn"` LDAPAccess AccessLevelValue `json:"ldap_access"` LDAPGroupLinks []*LDAPGroupLink `json:"ldap_group_links"` + FileTemplateProjectId int `json:"file_template_project_id"` SharedRunnersMinutesLimit int `json:"shared_runners_minutes_limit"` ExtraSharedRunnersMinutesLimit int `json:"extra_shared_runners_minutes_limit"` PreventForkingOutsideGroup bool `json:"prevent_forking_outside_group"` diff --git a/groups_test.go b/groups_test.go index e2e2b87b5..da09beb02 100644 --- a/groups_test.go +++ b/groups_test.go @@ -49,6 +49,28 @@ func TestGetGroup(t *testing.T) { } } +func TestGetGroupWithFileTemplateId(t *testing.T) { + mux, server, client := setup(t) + defer teardown(server) + + mux.HandleFunc("/api/v4/groups/g", + func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, http.MethodGet) + fmt.Fprint(w, `{"id": 1, "name": "g","file_template_project_id": 12345}`) + }) + + group, _, err := client.Groups.GetGroup("g", &GetGroupOptions{}) + if err != nil { + t.Errorf("Groups.GetGroup returned error: %v", err) + } + + want := &Group{ID: 1, Name: "g", FileTemplateProjectId: 12345} + if !reflect.DeepEqual(want, group) { + t.Errorf("Groups.GetGroup returned %+v, want %+v", group, want) + } + +} + func TestCreateGroup(t *testing.T) { mux, server, client := setup(t) defer teardown(server)