Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Enhancement - make user contributed projects endpoint configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
kolluria committed Oct 10, 2024
1 parent 6c05c53 commit 85380ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ import (
"github.com/hashicorp/go-retryablehttp"
)

var (
UserContributedProjectsEndpoint = "users/%s/contributed_projects"
)

// ProjectsService handles communication with the repositories related methods
// of the GitLab API.
//
Expand Down Expand Up @@ -410,7 +414,7 @@ func (s *ProjectsService) ListUserContributedProjects(uid interface{}, opt *List
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("users/%s/contributed_projects", user)
u := fmt.Sprintf(UserContributedProjectsEndpoint, user)

req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
if err != nil {
Expand Down

0 comments on commit 85380ae

Please sign in to comment.