Skip to content
Snippets Groups Projects
Commit f4efc464 authored by Łukasz Łopatowski's avatar Łukasz Łopatowski
Browse files

Fixed the GitLab call for getting project details by name

parent e97ebff1
No related branches found
No related tags found
No related merge requests found
...@@ -145,7 +145,10 @@ func (s *configServiceServer) FindGitlabProjectId(api *gitlab.Client, uid string ...@@ -145,7 +145,10 @@ func (s *configServiceServer) FindGitlabProjectId(api *gitlab.Client, uid string
return -1, status.Errorf(codes.NotFound, "Gitlab Group for given domain does not exist") return -1, status.Errorf(codes.NotFound, "Gitlab Group for given domain does not exist")
} }
project, _, err := api.Projects.GetProject(uid, &gitlab.GetProjectOptions{}) var projectName = "groups-" + domain + "%2F" + uid
logLine(fmt.Sprintf("Using given project name %s to obtain project id", projectName))
project, _, err := api.Projects.GetProject(projectName, &gitlab.GetProjectOptions{})
if err != nil { if err != nil {
log.Print(err) log.Print(err)
return -1, status.Errorf(codes.NotFound, "Gitlab Project for given uid does not exist") return -1, status.Errorf(codes.NotFound, "Gitlab Project for given uid does not exist")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment