Skip to content

Commit 580df7a

Browse files
committed
Update misleading GitLab client comments
Signed-off-by: Erik Godding Boye <[email protected]>
1 parent ecb9610 commit 580df7a

5 files changed

+10
-10
lines changed

gitlab/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (c *Client) ProviderID() gitprovider.ProviderID {
9090
return ProviderID
9191
}
9292

93-
// Raw returns the Go GitLab client (github.com/xanzy *Client)
93+
// Raw returns the Go GitLab client (gitlab.com/gitlab-org/api/client-go *Client)
9494
// used under the hood for accessing GitLab.
9595
func (c *Client) Raw() interface{} {
9696
return c.c.Client()

gitlab/example_organization_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func ExampleOrganizationsClient_Get() {
3535

3636
// Use .Get() to aquire a high-level gitprovider.OrganizationInfo struct
3737
orgInfo := org.Get()
38-
// Cast the internal object to a *gogithub.Organization to access custom data
38+
// Cast the internal object to a *gogitlab.Group to access custom data
3939
internalOrg := org.APIObject().(*gogitlab.Group)
4040

4141
fmt.Printf("Name: %s. Location: %s.", *orgInfo.Name, internalOrg.Path)

gitlab/example_repository_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func ExampleOrgRepositoriesClient_Get() {
2828

2929
// Use .Get() to aquire a high-level gitprovider.OrganizationInfo struct
3030
repoInfo := repo.Get()
31-
// Cast the internal object to a *gogithub.Repository to access custom data
31+
// Cast the internal object to a *gogitlab.Project to access custom data
3232
internalRepo := repo.APIObject().(*gogitlab.Project)
3333

3434
fmt.Printf("Description: %s. Homepage: %s", *repoInfo.Description, internalRepo.HTTPURLToRepo)

gitlab/gitlabclient.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ import (
2525
"gitlab.com/gitlab-org/api/client-go"
2626
)
2727

28-
// gitlabClientImpl is a wrapper around *github.Client, which implements higher-level methods,
29-
// operating on the go-github structs. Pagination is implemented for all List* methods, all returned
28+
// gitlabClientImpl is a wrapper around *gitlab.Client, which implements higher-level methods,
29+
// operating on the go-gitlab structs. Pagination is implemented for all List* methods, all returned
3030
// objects are validated, and HTTP errors are handled/wrapped using handleHTTPError.
3131
// This interface is also fakeable, in order to unit-test the client.
3232
type gitlabClient interface {
33-
// Client returns the underlying *github.Client
33+
// Client returns the underlying *gitlab.Client
3434
Client() *gitlab.Client
3535

3636
// Group methods

gitlab/util.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func allDeployTokenPages(opts *gitlab.ListProjectDeployTokensOptions, fn func()
130130
}
131131
}
132132

133-
// validateUserRepositoryRef makes sure the UserRepositoryRef is valid for GitHub's usage.
133+
// validateUserRepositoryRef makes sure the UserRepositoryRef is valid for GitLab's usage.
134134
func validateUserRepositoryRef(ref gitprovider.UserRepositoryRef, expectedDomain string) error {
135135
// Make sure the RepositoryRef fields are valid
136136
if err := validation.ValidateTargets("UserRepositoryRef", ref); err != nil {
@@ -140,7 +140,7 @@ func validateUserRepositoryRef(ref gitprovider.UserRepositoryRef, expectedDomain
140140
return validateIdentityFields(ref, expectedDomain)
141141
}
142142

143-
// validateOrgRepositoryRef makes sure the OrgRepositoryRef is valid for GitHub's usage.
143+
// validateOrgRepositoryRef makes sure the OrgRepositoryRef is valid for GitLab's usage.
144144
func validateOrgRepositoryRef(ref gitprovider.OrgRepositoryRef, expectedDomain string) error {
145145
// Make sure the RepositoryRef fields are valid
146146
if err := validation.ValidateTargets("OrgRepositoryRef", ref); err != nil {
@@ -150,7 +150,7 @@ func validateOrgRepositoryRef(ref gitprovider.OrgRepositoryRef, expectedDomain s
150150
return validateIdentityFields(ref, expectedDomain)
151151
}
152152

153-
// validateUserRef makes sure the UserRef is valid for GitHub's usage.
153+
// validateUserRef makes sure the UserRef is valid for GitLab's usage.
154154
func validateUserRef(ref gitprovider.UserRef, expectedDomain string) error {
155155
// Make sure the OrganizationRef fields are valid
156156
if err := validation.ValidateTargets("UserRef", ref); err != nil {
@@ -192,7 +192,7 @@ func validateProjectAPI(apiObj *gitlab.Project) error {
192192
})
193193
}
194194

195-
// validateOrganizationRef makes sure the OrganizationRef is valid for GitHub's usage.
195+
// validateOrganizationRef makes sure the OrganizationRef is valid for GitLab's usage.
196196
func validateOrganizationRef(ref gitprovider.OrganizationRef, expectedDomain string) error {
197197
// Make sure the OrganizationRef fields are valid
198198
if err := validation.ValidateTargets("OrganizationRef", ref); err != nil {

0 commit comments

Comments
 (0)