Skip to content

Commit defa8bb

Browse files
theakshaypantclaude
andcommitted
chore: bump golang.org/x/oauth2 to v0.27.0
Update golang.org/x/oauth2 dependency to v0.27.0, which removes deprecated App Engine support and the google.golang.org/appengine dependency. Fix GitLab provider test mocks to URL-encode file paths, matching the go-gitlab library behavior exposed by the oauth2 update. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Akshay Pant <akshay.akshaypant@gmail.com>
1 parent 920f398 commit defa8bb

40 files changed

+29
-9911
lines changed

go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/openshift-pipelines/pipelines-as-code
22

3-
go 1.21
3+
go 1.23.0
44

55
require (
66
code.gitea.io/gitea/modules/structs v0.0.0-20190610152049-835b53fc259c
@@ -32,7 +32,7 @@ require (
3232
go.opencensus.io v0.24.0
3333
go.uber.org/zap v1.27.0
3434
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8
35-
golang.org/x/oauth2 v0.18.0
35+
golang.org/x/oauth2 v0.27.0
3636
golang.org/x/sync v0.6.0
3737
golang.org/x/text v0.14.0
3838
gopkg.in/yaml.v2 v2.4.0
@@ -138,7 +138,6 @@ require (
138138
golang.org/x/time v0.5.0 // indirect
139139
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
140140
google.golang.org/api v0.172.0 // indirect
141-
google.golang.org/appengine v1.6.8 // indirect
142141
google.golang.org/genproto/googleapis/api v0.0.0-20240401170217-c3f982113cda // indirect
143142
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
144143
google.golang.org/grpc v1.63.0 // indirect

go.sum

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,8 +1383,9 @@ golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I
13831383
golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw=
13841384
golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
13851385
golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=
1386-
golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI=
13871386
golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8=
1387+
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
1388+
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
13881389
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
13891390
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
13901391
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1697,8 +1698,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww
16971698
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
16981699
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
16991700
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
1700-
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
1701-
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
17021701
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
17031702
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
17041703
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=

pkg/provider/gitlab/test/test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"io"
66
"net/http"
77
"net/http/httptest"
8+
"net/url"
89
"os"
910
"strings"
1011
"testing"
@@ -96,7 +97,9 @@ func MuxDiscussionsNote(mux *http.ServeMux, pid, mrID int, author string, author
9697
}
9798

9899
func MuxGetFile(mux *http.ServeMux, pid int, fname, content string) {
99-
mux.HandleFunc(fmt.Sprintf("/projects/%d/repository/files/%s/raw", pid, fname), func(rw http.ResponseWriter, _ *http.Request) {
100+
// URL-encode the filename to match how go-gitlab encodes paths
101+
encodedFname := url.PathEscape(fname)
102+
mux.HandleFunc(fmt.Sprintf("/projects/%d/repository/files/%s/raw", pid, encodedFname), func(rw http.ResponseWriter, _ *http.Request) {
100103
fmt.Fprint(rw, content)
101104
})
102105
}

vendor/golang.org/x/oauth2/LICENSE

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/oauth2/README.md

Lines changed: 5 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/oauth2/internal/client_appengine.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

vendor/golang.org/x/oauth2/internal/transport.go

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/oauth2/oauth2.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/oauth2/pkce.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)