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

Commit

Permalink
Upgrade go-gitlab to v0.52.2
Browse files Browse the repository at this point in the history
  • Loading branch information
samcontesse committed Dec 27, 2021
1 parent 03783eb commit 0db4107
Show file tree
Hide file tree
Showing 5 changed files with 352 additions and 22 deletions.
8 changes: 5 additions & 3 deletions check/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ func main() {
common.Fatal("reading request from stdin", err)
}

api := gitlab.NewClient(common.GetDefaultClient(request.Source.Insecure), request.Source.PrivateToken)
api.SetBaseURL(request.Source.GetBaseURL())
api, err := gitlab.NewClient(request.Source.PrivateToken, gitlab.WithHTTPClient(common.GetDefaultClient(request.Source.Insecure)), gitlab.WithBaseURL(request.Source.GetBaseURL()))
if err != nil {
common.Fatal("initializing gitlab client", err)
}

labels := gitlab.Labels(request.Source.Labels)

Expand All @@ -33,7 +35,7 @@ func main() {
State: gitlab.String("opened"),
OrderBy: gitlab.String("updated_at"),
Sort: gitlab.String(sort),
Labels: &labels,
Labels: labels,
TargetBranch: gitlab.String(request.Source.TargetBranch),
}
requests, _, err := api.MergeRequests.ListProjectMergeRequests(request.Source.GetProjectPath(), options)
Expand Down
13 changes: 9 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@ module github.com/samcontesse/gitlab-merge-request-resource

require (
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.0 // indirect
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.17.0
github.com/xanzy/go-gitlab v0.28.0
golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9 // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
github.com/xanzy/go-gitlab v0.52.2
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.5 // indirect
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
)

go 1.13
Loading

0 comments on commit 0db4107

Please sign in to comment.