@@ -116,7 +116,7 @@ func (c Gitlab) GetOrgRepos(targetOrg string) ([]Repo, error) {
116116func (c Gitlab ) GetTopLevelGroups () ([]string , error ) {
117117 opt := & gitlab.ListGroupsOptions {
118118 ListOptions : gitlab.ListOptions {
119- PerPage : perPage ,
119+ PerPage : int64 ( perPage ) ,
120120 Page : 1 ,
121121 },
122122 TopLevelOnly : & []bool {true }[0 ],
@@ -139,7 +139,7 @@ func (c Gitlab) GetTopLevelGroups() ([]string, error) {
139139 }
140140
141141 // Multiple pages - fetch remaining pages in parallel
142- return c .fetchTopLevelGroupsParallel (groups , resp .TotalPages )
142+ return c .fetchTopLevelGroupsParallel (groups , int ( resp .TotalPages ) )
143143}
144144
145145// In this case take the cloneURL from the cloneTartet repo and just inject /snippets/:id before the .git
@@ -198,8 +198,10 @@ func (c Gitlab) createRootLevelSnippetCloneURL(snippetWebURL string) string {
198198func (c Gitlab ) getRepoSnippets (r Repo ) []* gitlab.Snippet {
199199 var allSnippets []* gitlab.Snippet
200200 opt := & gitlab.ListProjectSnippetsOptions {
201- PerPage : perPage ,
202- Page : 1 ,
201+ ListOptions : gitlab.ListOptions {
202+ PerPage : int64 (perPage ),
203+ Page : 1 ,
204+ },
203205 }
204206
205207 for {
@@ -232,7 +234,7 @@ func (c Gitlab) getAllSnippets() []*gitlab.Snippet {
232234 var allSnippets []* gitlab.Snippet
233235 opt := & gitlab.ListAllSnippetsOptions {
234236 ListOptions : gitlab.ListOptions {
235- PerPage : perPage ,
237+ PerPage : int64 ( perPage ) ,
236238 Page : 1 ,
237239 },
238240 }
@@ -307,7 +309,7 @@ func (c Gitlab) GetSnippets(cloneData []Repo, target string) ([]Repo, error) {
307309 }
308310
309311 for _ , snippet := range allSnippetsToClone {
310- snippetID := strconv .Itoa (snippet .ID )
312+ snippetID := strconv .FormatInt (snippet .ID , 10 )
311313 snippetTitle := ToSlug (snippet .Title )
312314 s := Repo {}
313315 s .IsGitLabSnippet = true
@@ -324,7 +326,7 @@ func (c Gitlab) GetSnippets(cloneData []Repo, target string) ([]Repo, error) {
324326 } else {
325327 // Since this isn't a root level repo we want to find which repo the snippet is coming from
326328 for _ , cloneTarget := range cloneData {
327- if cloneTarget .ID == strconv .Itoa (snippet .ProjectID ) {
329+ if cloneTarget .ID == strconv .FormatInt (snippet .ProjectID , 10 ) {
328330 s .CloneURL = c .createRepoSnippetCloneURL (cloneTarget .CloneURL , snippetID )
329331 s .Path = cloneTarget .Path
330332 s .GitLabSnippetInfo .URLOfRepo = cloneTarget .URL
@@ -344,7 +346,7 @@ func (c Gitlab) GetSnippets(cloneData []Repo, target string) ([]Repo, error) {
344346func (c Gitlab ) GetGroupRepos (targetGroup string ) ([]Repo , error ) {
345347 opt := & gitlab.ListGroupProjectsOptions {
346348 ListOptions : gitlab.ListOptions {
347- PerPage : perPage ,
349+ PerPage : int64 ( perPage ) ,
348350 Page : 1 ,
349351 },
350352 IncludeSubGroups : gitlab .Ptr (true ),
@@ -365,7 +367,7 @@ func (c Gitlab) GetGroupRepos(targetGroup string) ([]Repo, error) {
365367 }
366368
367369 // Multiple pages - fetch remaining pages in parallel
368- return c .fetchGroupReposParallel (targetGroup , ps , resp .TotalPages )
370+ return c .fetchGroupReposParallel (targetGroup , ps , int ( resp .TotalPages ) )
369371}
370372
371373// GetUserRepos gets all of a users gitlab repos
@@ -375,14 +377,14 @@ func (c Gitlab) GetUserRepos(targetUsername string) ([]Repo, error) {
375377
376378 projectOpts := & gitlab.ListProjectsOptions {
377379 ListOptions : gitlab.ListOptions {
378- PerPage : perPage ,
380+ PerPage : int64 ( perPage ) ,
379381 Page : 1 ,
380382 },
381383 }
382384
383385 userOpts := & gitlab.ListUsersOptions {
384386 ListOptions : gitlab.ListOptions {
385- PerPage : perPage ,
387+ PerPage : int64 ( perPage ) ,
386388 Page : 1 ,
387389 },
388390 }
@@ -520,7 +522,7 @@ func (c Gitlab) filter(group string, ps []*gitlab.Project) []Repo {
520522 r := Repo {}
521523
522524 r .Name = p .Name
523- r .ID = strconv .Itoa ( p .ID )
525+ r .ID = strconv .FormatInt ( int64 ( p .ID ), 10 )
524526
525527 if os .Getenv ("GHORG_BRANCH" ) == "" {
526528 defaultBranch := p .DefaultBranch
0 commit comments