Skip to content

Commit a44a24b

Browse files
authored
fix: Relax go directive in go.mod to 1.22.0 (#3423)
Fixes: #3422.
1 parent 27e3249 commit a44a24b

File tree

11 files changed

+35
-32
lines changed

11 files changed

+35
-32
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
shell: bash
2525
strategy:
2626
matrix:
27-
go-version: [1.x, 1.22.x]
27+
go-version: [1.x, 1.22.0] # test with N and the .0 release of N-1
2828
platform: [ubuntu-latest]
2929
include:
3030
# include windows, but only with the latest Go version, since there

README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@
99

1010
go-github is a Go client library for accessing the [GitHub API v3][].
1111

12-
**go-github requires Go version 1.17 and greater** and
13-
the library is tested against Go version 1.22 and greater. go-github tracks
14-
[Go's version support policy][support-policy]. We do our best not to break
15-
older versions of Go if we don't have to, but due to tooling constraints, we
16-
don't always test older versions.
12+
go-github tracks [Go's version support policy][support-policy] supporting any
13+
minor version of the latest two major releases of Go and the go directive in
14+
go.mod reflects that.
15+
We do our best not to break older versions of Go if we don't have to, but we
16+
don't explicitly test older versions and as of Go 1.21 the go directive in
17+
go.mod declares a hard required _minimum_ version of Go to use with this module
18+
and this _must_ be greater than or equal to the go line of all dependencies so
19+
go-github will require the N-1 major release of Go by default.
20+
21+
[support-policy]: https://golang.org/doc/devel/release.html#policy
22+
23+
## Development
1724

1825
Go version 1.22 introduced significant changes to the pattern syntax and matching
1926
behavior of `http.ServerMux` which causes a large number of legacy unit tests to break.
@@ -28,8 +35,6 @@ An issue has been created (#3409) requesting assistance in updating all breaking
2835
tests when this `GODEBUG` environment variable is not set and Go 1.23.4 or later is
2936
used to perform unit tests.
3037

31-
[support-policy]: https://golang.org/doc/devel/release.html#policy
32-
3338
If you're interested in using the [GraphQL API v4][], the recommended library is
3439
[shurcooL/githubv4][].
3540

example/go.mod

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module github.com/google/go-github/v68/example
22

3-
go 1.22.10
3+
go 1.22.0
44

55
require (
66
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371
77
github.com/bradleyfalzon/ghinstallation/v2 v2.0.4
88
github.com/gofri/go-github-ratelimit v1.0.3
99
github.com/google/go-github/v68 v68.0.0
10-
github.com/sigstore/sigstore-go v0.6.2
10+
github.com/sigstore/sigstore-go v0.5.1
1111
golang.org/x/crypto v0.31.0
1212
golang.org/x/term v0.27.0
1313
google.golang.org/appengine v1.6.8
@@ -45,7 +45,6 @@ require (
4545
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
4646
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
4747
github.com/hashicorp/hcl v1.0.0 // indirect
48-
github.com/in-toto/attestation v1.1.0 // indirect
4948
github.com/in-toto/in-toto-golang v0.9.0 // indirect
5049
github.com/inconshreveable/mousetrap v1.1.0 // indirect
5150
github.com/jedisct1/go-minisign v0.0.0-20211028175153-1c139d1cc84b // indirect
@@ -66,7 +65,7 @@ require (
6665
github.com/shibumi/go-pathspec v1.3.0 // indirect
6766
github.com/sigstore/protobuf-specs v0.3.2 // indirect
6867
github.com/sigstore/rekor v1.3.6 // indirect
69-
github.com/sigstore/sigstore v1.8.9 // indirect
68+
github.com/sigstore/sigstore v1.8.11 // indirect
7069
github.com/sigstore/timestamp-authority v1.2.2 // indirect
7170
github.com/sourcegraph/conc v0.3.0 // indirect
7271
github.com/spf13/afero v1.11.0 // indirect

example/go.sum

+6-8
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ github.com/hashicorp/vault/api v1.12.2 h1:7YkCTE5Ni90TcmYHDBExdt4WGJxhpzaHqR6uGb
203203
github.com/hashicorp/vault/api v1.12.2/go.mod h1:LSGf1NGT1BnvFFnKVtnvcaLBM2Lz+gJdpL6HUYed8KE=
204204
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef h1:A9HsByNhogrvm9cWb28sjiS3i7tcKCkflWFEkHfuAgM=
205205
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs=
206-
github.com/in-toto/attestation v1.1.0 h1:oRWzfmZPDSctChD0VaQV7MJrywKOzyNrtpENQFq//2Q=
207-
github.com/in-toto/attestation v1.1.0/go.mod h1:DB59ytd3z7cIHgXxwpSX2SABrU6WJUKg/grpdgHVgVs=
208206
github.com/in-toto/in-toto-golang v0.9.0 h1:tHny7ac4KgtsfrG6ybU8gVOZux2H8jN05AXJ9EBM1XU=
209207
github.com/in-toto/in-toto-golang v0.9.0/go.mod h1:xsBVrVsHNsB61++S6Dy2vWosKhuA3lUTQd+eF9HdeMo=
210208
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
@@ -285,10 +283,10 @@ github.com/sigstore/protobuf-specs v0.3.2 h1:nCVARCN+fHjlNCk3ThNXwrZRqIommIeNKWw
285283
github.com/sigstore/protobuf-specs v0.3.2/go.mod h1:RZ0uOdJR4OB3tLQeAyWoJFbNCBFrPQdcokntde4zRBA=
286284
github.com/sigstore/rekor v1.3.6 h1:QvpMMJVWAp69a3CHzdrLelqEqpTM3ByQRt5B5Kspbi8=
287285
github.com/sigstore/rekor v1.3.6/go.mod h1:JDTSNNMdQ/PxdsS49DJkJ+pRJCO/83nbR5p3aZQteXc=
288-
github.com/sigstore/sigstore v1.8.9 h1:NiUZIVWywgYuVTxXmRoTT4O4QAGiTEKup4N1wdxFadk=
289-
github.com/sigstore/sigstore v1.8.9/go.mod h1:d9ZAbNDs8JJfxJrYmulaTazU3Pwr8uLL9+mii4BNR3w=
290-
github.com/sigstore/sigstore-go v0.6.2 h1:8uiywjt73vzfrGfWYVwVsiB1E1Qmwmpgr1kVpl4fs6A=
291-
github.com/sigstore/sigstore-go v0.6.2/go.mod h1:pOIUH7Jx+ctwMICo+2zNrViOJJN5sGaQgwX4yAVJkA0=
286+
github.com/sigstore/sigstore v1.8.11 h1:tEqeQqbT+awtM87ec9KEeSUxT/AFvJNawneYJyAkFrQ=
287+
github.com/sigstore/sigstore v1.8.11/go.mod h1:fdrFQosxCQ4wTL5H1NrZcQkqQ72AQbPjtpcL2QOGKV0=
288+
github.com/sigstore/sigstore-go v0.5.1 h1:5IhKvtjlQBeLnjKkzMELNG4tIBf+xXQkDzhLV77+/8Y=
289+
github.com/sigstore/sigstore-go v0.5.1/go.mod h1:TuOfV7THHqiDaUHuJ5+QN23RP/YoKmsbwJpY+aaYPN0=
292290
github.com/sigstore/sigstore/pkg/signature/kms/aws v1.8.3 h1:LTfPadUAo+PDRUbbdqbeSl2OuoFQwUFTnJ4stu+nwWw=
293291
github.com/sigstore/sigstore/pkg/signature/kms/aws v1.8.3/go.mod h1:QV/Lxlxm0POyhfyBtIbTWxNeF18clMlkkyL9mu45y18=
294292
github.com/sigstore/sigstore/pkg/signature/kms/azure v1.8.3 h1:xgbPRCr2npmmsuVVteJqi/ERw9+I13Wou7kq0Yk4D8g=
@@ -380,8 +378,8 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
380378
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
381379
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
382380
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
383-
golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA=
384-
golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
381+
golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE=
382+
golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
385383
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
386384
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
387385
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

example/newreposecretwithlibsodium/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module newreposecretwithlibsodium
22

3-
go 1.22.10
3+
go 1.22.0
44

55
require (
66
github.com/GoKillers/libsodium-go v0.0.0-20171022220152-dd733721c3cb

example/verifyartifact/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func main() {
102102
log.Fatal(err)
103103
}
104104

105-
var b *bundle.Bundle
105+
var b *bundle.ProtobufBundle
106106
for _, attestation := range attestations.Attestations {
107107
if err := json.Unmarshal(attestation.Bundle, &b); err != nil {
108108
log.Fatal(err)
@@ -180,7 +180,7 @@ func getPolicyBuilder() (*verify.PolicyBuilder, error) {
180180
return &pb, nil
181181
}
182182

183-
func runVerification(sev *verify.SignedEntityVerifier, pb *verify.PolicyBuilder, b *bundle.Bundle) error {
183+
func runVerification(sev *verify.SignedEntityVerifier, pb *verify.PolicyBuilder, b *bundle.ProtobufBundle) error {
184184
res, err := sev.Verify(b, *pb)
185185
if err != nil {
186186
return err

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/google/go-github/v68
22

3+
go 1.22.0
4+
35
require (
46
github.com/google/go-cmp v0.6.0
57
github.com/google/go-querystring v1.1.0
68
)
7-
8-
go 1.22.10

scrape/go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module github.com/google/go-github/scrape
22

3-
go 1.23.4
3+
go 1.22.0
44

55
require (
6-
github.com/PuerkitoBio/goquery v1.10.1
6+
github.com/PuerkitoBio/goquery v1.9.3
77
github.com/google/go-cmp v0.6.0
88
github.com/google/go-github/v68 v68.0.0
99
github.com/xlzd/gotp v0.1.0

scrape/go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/PuerkitoBio/goquery v1.10.1 h1:Y8JGYUkXWTGRB6Ars3+j3kN0xg1YqqlwvdTV8WTFQcU=
2-
github.com/PuerkitoBio/goquery v1.10.1/go.mod h1:IYiHrOMps66ag56LEH7QYDDupKXyo5A8qrjIx3ZtujY=
1+
github.com/PuerkitoBio/goquery v1.9.3 h1:mpJr/ikUA9/GNJB/DBZcGeFDXUtosHRyRrwh7KGdTG0=
2+
github.com/PuerkitoBio/goquery v1.9.3/go.mod h1:1ndLHPdTz+DyQPICCWYlYQMPl0oXZj0G6D4LCYA6u4U=
33
github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM=
44
github.com/andybalholm/cascadia v1.3.3/go.mod h1:xNd9bqTn98Ln4DwST8/nG+H0yuB8Hmgu1YHNnWw0GeA=
55
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=

tools/go.mod

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module tools
22

3-
go 1.23.4
3+
go 1.22.0
44

55
require (
66
github.com/alecthomas/kong v1.6.0
@@ -14,6 +14,7 @@ require (
1414
require (
1515
github.com/go-openapi/jsonpointer v0.21.0 // indirect
1616
github.com/go-openapi/swag v0.23.0 // indirect
17+
github.com/go-test/deep v1.1.1 // indirect
1718
github.com/google/go-querystring v1.1.0 // indirect
1819
github.com/invopop/yaml v0.3.1 // indirect
1920
github.com/josharian/intern v1.0.0 // indirect

tools/go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1
1212
github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY=
1313
github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
1414
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
15-
github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=
16-
github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
15+
github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U=
16+
github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
1717
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
1818
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
1919
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=

0 commit comments

Comments
 (0)