Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use new library for go-gitlab #1866

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ require (
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
github.com/tektoncd/pipeline v0.65.1
github.com/xanzy/go-gitlab v0.113.0
gitlab.com/gitlab-org/api/client-go v0.116.0
go.opencensus.io v0.24.0
go.uber.org/zap v1.27.0
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -470,15 +470,15 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xanzy/go-gitlab v0.113.0 h1:v5O4R+YZbJGxKqa9iIZxjMyeKkMKBN8P6sZsNl+YckM=
github.com/xanzy/go-gitlab v0.113.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY=
github.com/xlzd/gotp v0.1.0 h1:37blvlKCh38s+fkem+fFh7sMnceltoIEBYTVXyoa5Po=
github.com/xlzd/gotp v0.1.0/go.mod h1:ndLJ3JKzi3xLmUProq4LLxCuECL93dG9WASNLpHz8qg=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
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.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/webhook/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/openshift-pipelines/pipelines-as-code/pkg/cli"
"github.com/openshift-pipelines/pipelines-as-code/pkg/cli/prompt"
"github.com/openshift-pipelines/pipelines-as-code/pkg/random"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
)

type gitLabConfig struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/matcher/annotation_matcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
ghtesthelper "github.com/openshift-pipelines/pipelines-as-code/pkg/test/github"
testnewrepo "github.com/openshift-pipelines/pipelines-as-code/pkg/test/repository"
tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
"go.uber.org/zap"
zapobserver "go.uber.org/zap/zaptest/observer"
"gotest.tools/v3/assert"
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/gitlab/acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/openshift-pipelines/pipelines-as-code/pkg/acl"
"github.com/openshift-pipelines/pipelines-as-code/pkg/params/info"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
)

// IsAllowedOwnersFile get the owner files (OWNERS, OWNERS_ALIASES) from main branch
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/gitlab/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"

"github.com/openshift-pipelines/pipelines-as-code/pkg/provider"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/gitlab/detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

thelp "github.com/openshift-pipelines/pipelines-as-code/pkg/provider/gitlab/test"
"github.com/openshift-pipelines/pipelines-as-code/pkg/test/logger"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
"gotest.tools/v3/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/openshift-pipelines/pipelines-as-code/pkg/params/info"
"github.com/openshift-pipelines/pipelines-as-code/pkg/params/triggertype"
"github.com/openshift-pipelines/pipelines-as-code/pkg/provider"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/gitlab/gitlab_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
thelp "github.com/openshift-pipelines/pipelines-as-code/pkg/provider/gitlab/test"
testclient "github.com/openshift-pipelines/pipelines-as-code/pkg/test/clients"
"github.com/openshift-pipelines/pipelines-as-code/pkg/test/logger"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
"go.uber.org/zap"
zapobserver "go.uber.org/zap/zaptest/observer"
"gotest.tools/v3/assert"
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/gitlab/parse_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/openshift-pipelines/pipelines-as-code/pkg/params"
"github.com/openshift-pipelines/pipelines-as-code/pkg/params/info"
"github.com/openshift-pipelines/pipelines-as-code/pkg/params/triggertype"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
)

func (v *Provider) ParsePayload(_ context.Context, _ *params.Run, request *http.Request,
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/gitlab/parse_payload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/openshift-pipelines/pipelines-as-code/pkg/params"
"github.com/openshift-pipelines/pipelines-as-code/pkg/params/info"
thelp "github.com/openshift-pipelines/pipelines-as-code/pkg/provider/gitlab/test"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
"gotest.tools/v3/assert"
rtesting "knative.dev/pkg/reconciler/testing"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/gitlab/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"testing"

"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
"gotest.tools/v3/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion test/gitlab_delete_tag_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
tgitlab "github.com/openshift-pipelines/pipelines-as-code/test/pkg/gitlab"
twait "github.com/openshift-pipelines/pipelines-as-code/test/pkg/wait"
"github.com/tektoncd/pipeline/pkg/names"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
"gotest.tools/v3/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion test/gitlab_merge_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/openshift-pipelines/pipelines-as-code/test/pkg/scm"
twait "github.com/openshift-pipelines/pipelines-as-code/test/pkg/wait"
"github.com/tektoncd/pipeline/pkg/names"
clientGitlab "github.com/xanzy/go-gitlab"
clientGitlab "gitlab.com/gitlab-org/api/client-go"
"gotest.tools/v3/assert"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion test/pkg/gitlab/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/openshift-pipelines/pipelines-as-code/pkg/params"
pacrepo "github.com/openshift-pipelines/pipelines-as-code/test/pkg/repository"
"github.com/openshift-pipelines/pipelines-as-code/test/pkg/secret"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion test/pkg/gitlab/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/openshift-pipelines/pipelines-as-code/pkg/provider/gitlab"
"github.com/openshift-pipelines/pipelines-as-code/test/pkg/options"
"github.com/openshift-pipelines/pipelines-as-code/test/pkg/repository"
gitlab2 "github.com/xanzy/go-gitlab"
gitlab2 "gitlab.com/gitlab-org/api/client-go"
"gotest.tools/v3/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion test/pkg/gitlab/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net/http"

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

func CreateMR(client *ghlib.Client, pid int, sourceBranch, targetBranch, title string) (int, error) {
Expand Down
208 changes: 0 additions & 208 deletions vendor/github.com/xanzy/go-gitlab/README.md

This file was deleted.

Loading
Loading