@@ -80,10 +80,10 @@ type gitlabClient interface {
8080
8181 // ListKeys is a wrapper for "GET /projects/{project}/deploy_keys".
8282 // This function handles pagination, HTTP error wrapping, and validates the server result.
83- ListKeys (projectName string ) ([]* gitlab.DeployKey , error )
83+ ListKeys (projectName string ) ([]* gitlab.ProjectDeployKey , error )
8484 // CreateProjectKey is a wrapper for "POST /projects/{project}/deploy_keys".
8585 // This function handles HTTP error wrapping, and validates the server result.
86- CreateKey (projectName string , req * gitlab.DeployKey ) (* gitlab.DeployKey , error )
86+ CreateKey (projectName string , req * gitlab.ProjectDeployKey ) (* gitlab.ProjectDeployKey , error )
8787 // DeleteKey is a wrapper for "DELETE /projects/{project}/deploy_keys/{key_id}".
8888 // This function handles HTTP error wrapping.
8989 DeleteKey (projectName string , keyID int ) error
@@ -155,10 +155,10 @@ func (c *gitlabClientImpl) ListGroups(ctx context.Context) ([]*gitlab.Group, err
155155
156156func (c * gitlabClientImpl ) ListSubgroups (ctx context.Context , groupName string ) ([]* gitlab.Group , error ) {
157157 var apiObjs []* gitlab.Group
158- opts := & gitlab.ListSubgroupsOptions {}
158+ opts := & gitlab.ListSubGroupsOptions {}
159159 err := allSubgroupPages (opts , func () (* gitlab.Response , error ) {
160160 // GET /groups
161- pageObjs , resp , listErr := c .c .Groups .ListSubgroups (groupName , opts , gitlab .WithContext (ctx ))
161+ pageObjs , resp , listErr := c .c .Groups .ListSubGroups (groupName , opts , gitlab .WithContext (ctx ))
162162 apiObjs = append (apiObjs , pageObjs ... )
163163 return resp , listErr
164164 })
@@ -329,8 +329,8 @@ func (c *gitlabClientImpl) DeleteProject(ctx context.Context, projectName string
329329 return err
330330}
331331
332- func (c * gitlabClientImpl ) ListKeys (projectName string ) ([]* gitlab.DeployKey , error ) {
333- apiObjs := []* gitlab.DeployKey {}
332+ func (c * gitlabClientImpl ) ListKeys (projectName string ) ([]* gitlab.ProjectDeployKey , error ) {
333+ apiObjs := []* gitlab.ProjectDeployKey {}
334334 opts := & gitlab.ListProjectDeployKeysOptions {}
335335 err := allDeployKeyPages (opts , func () (* gitlab.Response , error ) {
336336 // GET /projects/{project}/deploy_keys
@@ -350,11 +350,11 @@ func (c *gitlabClientImpl) ListKeys(projectName string) ([]*gitlab.DeployKey, er
350350 return apiObjs , nil
351351}
352352
353- func (c * gitlabClientImpl ) CreateKey (projectName string , req * gitlab.DeployKey ) (* gitlab.DeployKey , error ) {
353+ func (c * gitlabClientImpl ) CreateKey (projectName string , req * gitlab.ProjectDeployKey ) (* gitlab.ProjectDeployKey , error ) {
354354 opts := & gitlab.AddDeployKeyOptions {
355355 Title : & req .Title ,
356356 Key : & req .Key ,
357- CanPush : req .CanPush ,
357+ CanPush : & req .CanPush ,
358358 }
359359 // POST /projects/{project}/deploy_keys
360360 apiObj , _ , err := c .c .DeployKeys .AddDeployKey (projectName , opts )
0 commit comments