@@ -1043,6 +1043,44 @@ func (s *ProjectsService) StarProject(pid interface{}, options ...RequestOptionF
10431043 return p , resp , nil
10441044}
10451045
1046+ // ListProjectInvidedGroupOptions represents the available
1047+ // ListProjectsInvitedGroups() options.
1048+ //
1049+ // GitLab API docs:
1050+ // https://docs.gitlab.com/ee/api/projects.html#list-a-projects-invited-groups
1051+ type ListProjectInvidedGroupOptions struct {
1052+ ListOptions
1053+ Search * string `url:"search,omitempty" json:"search,omitempty"`
1054+ MinAccessLevel * AccessLevelValue `url:"min_access_level,omitempty" json:"min_access_level,omitempty"`
1055+ Relation * []string `url:"relation,omitempty" json:"relation,omitempty"`
1056+ WithCustomAttributes * bool `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"`
1057+ }
1058+
1059+ // ListProjectsInvitedGroups lists invited groups of a project
1060+ //
1061+ // GitLab API docs:
1062+ // https://docs.gitlab.com/ee/api/projects.html#list-a-projects-invited-groups
1063+ func (s * ProjectsService ) ListProjectsInvitedGroups (pid interface {}, opt * ListProjectInvidedGroupOptions , options ... RequestOptionFunc ) (* ProjectGroup , * Response , error ) {
1064+ project , err := parseID (pid )
1065+ if err != nil {
1066+ return nil , nil , err
1067+ }
1068+ u := fmt .Sprintf ("projects/%s/invited_groups" , PathEscape (project ))
1069+
1070+ req , err := s .client .NewRequest (http .MethodGet , u , opt , options )
1071+ if err != nil {
1072+ return nil , nil , err
1073+ }
1074+
1075+ pg := new (ProjectGroup )
1076+ resp , err := s .client .Do (req , pg )
1077+ if err != nil {
1078+ return nil , resp , err
1079+ }
1080+
1081+ return pg , resp , nil
1082+ }
1083+
10461084// UnstarProject unstars a given project.
10471085//
10481086// GitLab API docs:
0 commit comments