Skip to content

Commit

Permalink
Update gitlab.go
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrie30 committed May 25, 2024
1 parent e9ca0d7 commit 5d15d9c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions scm/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,17 @@ func (c Gitlab) GetSnippets(cloneData []Repo) ([]Repo, error) {
cloneData = append(cloneData, s)
} else {
// Since this isn't a root level repo we want to find which repo the snippet is coming from
for _, cloneTarget := range cloneData {

// snippet.ProjectID is not yet implemnted in the go-gitlab library
if cloneTarget.ID == snippet.ProjectID {
s.CloneURL = c.createRepoSnippetCloneURL(cloneTarget.CloneURL, snippetID)
s.Path = cloneTarget.Path
s.GitLabSnippetInfo.URLOfRepo = cloneTarget.URL
s.GitLabSnippetInfo.NameOfRepo = cloneTarget.Name
cloneData = append(cloneData, s)
}
}
// for _, cloneTarget := range cloneData {

// snippet.ProjectID is not yet implemnted in the go-gitlab library
// if cloneTarget.ID == snippet.ProjectID {
// s.CloneURL = c.createRepoSnippetCloneURL(cloneTarget.CloneURL, snippetID)
// s.Path = cloneTarget.Path
// s.GitLabSnippetInfo.URLOfRepo = cloneTarget.URL
// s.GitLabSnippetInfo.NameOfRepo = cloneTarget.Name
// cloneData = append(cloneData, s)
// }
// }
}

snippetsToClone = append(snippetsToClone, s)
Expand Down

0 comments on commit 5d15d9c

Please sign in to comment.