Skip to content

Commit

Permalink
Migrate to new GitLab client-go
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb committed Dec 28, 2024
1 parent 983e325 commit dca3dfd
Show file tree
Hide file tree
Showing 25 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion gitlab/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package gitlab

import (
"github.com/fluxcd/go-git-providers/gitprovider"
gogitlab "github.com/xanzy/go-gitlab"
gogitlab "gitlab.com/gitlab-org/api/client-go"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion gitlab/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"net/url"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// ProviderID is the provider ID for GitLab.
Expand Down
2 changes: 1 addition & 1 deletion gitlab/client_organization_teams.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// TeamsClient implements the gitprovider.TeamsClient interface.
Expand Down
2 changes: 1 addition & 1 deletion gitlab/client_repositories_org.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// OrgRepositoriesClient implements the gitprovider.OrgRepositoriesClient interface.
Expand Down
2 changes: 1 addition & 1 deletion gitlab/client_repository_branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// BranchClient implements the gitprovider.BranchClient interface.
Expand Down
2 changes: 1 addition & 1 deletion gitlab/client_repository_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// CommitClient implements the gitprovider.CommitClient interface.
Expand Down
2 changes: 1 addition & 1 deletion gitlab/client_repository_deploykey.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// DeployKeyClient implements the gitprovider.DeployKeyClient interface.
Expand Down
2 changes: 1 addition & 1 deletion gitlab/client_repository_deploytoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// DeployTokenClient implements the gitprovider.DeployTokenClient interface.
Expand Down
2 changes: 1 addition & 1 deletion gitlab/client_repository_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strings"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// FileClient implements the gitprovider.FileClient interface.
Expand Down
2 changes: 1 addition & 1 deletion gitlab/client_repository_pullrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"time"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// mergeStatusChecking indicates that gitlab has not yet asynchronously updated the merge status for a merge request
Expand Down
2 changes: 1 addition & 1 deletion gitlab/client_repository_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// TreeClient implements the gitprovider.TreeClient interface.
Expand Down
2 changes: 1 addition & 1 deletion gitlab/example_organization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/fluxcd/go-git-providers/gitlab"
"github.com/fluxcd/go-git-providers/gitprovider"
gogitlab "github.com/xanzy/go-gitlab"
gogitlab "gitlab.com/gitlab-org/api/client-go"
)

// checkErr is used for examples in this repository.
Expand Down
2 changes: 1 addition & 1 deletion gitlab/example_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/fluxcd/go-git-providers/gitlab"
"github.com/fluxcd/go-git-providers/gitprovider"
gogitlab "github.com/xanzy/go-gitlab"
gogitlab "gitlab.com/gitlab-org/api/client-go"
)

func ExampleOrgRepositoriesClient_Get() {
Expand Down
2 changes: 1 addition & 1 deletion gitlab/gitlabclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// gitlabClientImpl is a wrapper around *github.Client, which implements higher-level methods,
Expand Down
2 changes: 1 addition & 1 deletion gitlab/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"github.com/gregjones/httpcache"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"

"github.com/fluxcd/go-git-providers/gitprovider"
testutils "github.com/fluxcd/go-git-providers/gitprovider/testutils"
Expand Down
2 changes: 1 addition & 1 deletion gitlab/resource_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package gitlab

import (
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"

"github.com/fluxcd/go-git-providers/gitprovider"
)
Expand Down
2 changes: 1 addition & 1 deletion gitlab/resource_deploykey.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"reflect"

"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/fluxcd/go-git-providers/validation"
Expand Down
2 changes: 1 addition & 1 deletion gitlab/resource_deploytoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"reflect"

"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/fluxcd/go-git-providers/validation"
Expand Down
2 changes: 1 addition & 1 deletion gitlab/resource_organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package gitlab

import (
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/fluxcd/go-git-providers/validation"
Expand Down
2 changes: 1 addition & 1 deletion gitlab/resource_pullrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package gitlab

import (
"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

// The value of the "State" field of a gitlab merge request after it has been merged"
Expand Down
2 changes: 1 addition & 1 deletion gitlab/resource_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"

"github.com/google/go-cmp/cmp"
gogitlab "github.com/xanzy/go-gitlab"
gogitlab "gitlab.com/gitlab-org/api/client-go"

"github.com/fluxcd/go-git-providers/gitprovider"
)
Expand Down
2 changes: 1 addition & 1 deletion gitlab/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"strings"

"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/fluxcd/go-git-providers/validation"
Expand Down
2 changes: 1 addition & 1 deletion gitlab/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/fluxcd/go-git-providers/gitprovider"
"github.com/fluxcd/go-git-providers/validation"
"github.com/xanzy/go-gitlab"
"gitlab.com/gitlab-org/api/client-go"
)

func Test_validateAPIObject(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/ktrysmt/go-bitbucket v0.9.81
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.36.1
github.com/xanzy/go-gitlab v0.114.0
gitlab.com/gitlab-org/api/client-go v0.116.0
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.30.0
golang.org/x/oauth2 v0.24.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/xanzy/go-gitlab v0.114.0 h1:0wQr/KBckwrZPfEMjRqpUz0HmsKKON9UhCYv9KDy19M=
github.com/xanzy/go-gitlab v0.114.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY=
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
gitlab.com/gitlab-org/api/client-go v0.116.0 h1:Dy534gtZPMrnm3fAcmQRMadrcoUyFO4FQ4rXlSAdHAw=
gitlab.com/gitlab-org/api/client-go v0.116.0/go.mod h1:B29OfnZklmaoiR7uHANh9jTyfWEgmXvZLVEnosw2Dx0=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ=
Expand Down

0 comments on commit dca3dfd

Please sign in to comment.