Skip to content

Commit 9bcd92c

Browse files
authored
convert all code to use github/v68 (#13950)
1 parent 4ad2fc8 commit 9bcd92c

File tree

11 files changed

+41
-44
lines changed

11 files changed

+41
-44
lines changed

.ci/magician/cmd/scheduled_pr_reminders.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626

2727
membership "magician/github"
2828

29-
"github.com/google/go-github/v61/github"
29+
"github.com/google/go-github/v68/github"
3030
"github.com/spf13/cobra"
3131

3232
"golang.org/x/exp/slices"

.ci/magician/cmd/scheduled_pr_reminders_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
membership "magician/github"
88

9-
"github.com/google/go-github/v61/github"
9+
"github.com/google/go-github/v68/github"
1010
"github.com/stretchr/testify/assert"
1111
)
1212

.ci/magician/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ require (
1616
require (
1717
cloud.google.com/go/storage v1.50.0
1818
github.com/google/go-cmp v0.6.0
19-
github.com/google/go-github/v61 v61.0.0
2019
github.com/google/go-github/v68 v68.0.0
2120
github.com/otiai10/copy v1.12.0
2221
github.com/stretchr/testify v1.10.0

.ci/magician/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
8585
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
8686
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
8787
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
88-
github.com/google/go-github/v61 v61.0.0 h1:VwQCBwhyE9JclCI+22/7mLB1PuU9eowCXKY5pNlu1go=
89-
github.com/google/go-github/v61 v61.0.0/go.mod h1:0WR+KmsWX75G2EbpyGsGmradjo3IiciuI4BmdVCobQY=
9088
github.com/google/go-github/v68 v68.0.0 h1:ZW57zeNZiXTdQ16qrDiZ0k6XucrxZ2CGmoTvcCyQG6s=
9189
github.com/google/go-github/v68 v68.0.0/go.mod h1:K9HAUBovM2sLwM408A18h+wd9vqdLOEqTUCbnRIcx68=
9290
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=

tools/issue-labeler/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.23
44

55
require (
66
github.com/golang/glog v1.1.1
7-
github.com/google/go-github/v61 v61.0.0
7+
github.com/google/go-github/v68 v68.0.0
88
github.com/spf13/cobra v1.8.1
99
golang.org/x/exp v0.0.0-20230810033253-352e893a4cad
1010
golang.org/x/oauth2 v0.24.0

tools/issue-labeler/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ github.com/golang/glog v1.1.1/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/
44
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
55
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
66
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
7-
github.com/google/go-github/v61 v61.0.0 h1:VwQCBwhyE9JclCI+22/7mLB1PuU9eowCXKY5pNlu1go=
8-
github.com/google/go-github/v61 v61.0.0/go.mod h1:0WR+KmsWX75G2EbpyGsGmradjo3IiciuI4BmdVCobQY=
7+
github.com/google/go-github/v68 v68.0.0 h1:ZW57zeNZiXTdQ16qrDiZ0k6XucrxZ2CGmoTvcCyQG6s=
8+
github.com/google/go-github/v68 v68.0.0/go.mod h1:K9HAUBovM2sLwM408A18h+wd9vqdLOEqTUCbnRIcx68=
99
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
1010
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
1111
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=

tools/issue-labeler/labeler/backfill.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"time"
1010

1111
"github.com/golang/glog"
12-
"github.com/google/go-github/v61/github"
12+
"github.com/google/go-github/v68/github"
1313
)
1414

1515
type Label struct {

tools/issue-labeler/labeler/backfill_test.go

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
"strings"
88
"testing"
99

10-
"github.com/google/go-github/v61/github"
10+
"github.com/google/go-github/v68/github"
1111
)
1212

1313
func testIssueBodyWithResources(resources []string) *string {
14-
return github.String(fmt.Sprintf(`
14+
return github.Ptr(fmt.Sprintf(`
1515
### New or Affected Resource(s):
1616
1717
%s
@@ -54,7 +54,7 @@ func TestComputeIssueUpdates(t *testing.T) {
5454
description: "gracefully handle a nil issue body",
5555
issues: []*github.Issue{
5656
{
57-
Number: github.Int(1),
57+
Number: github.Ptr(1),
5858
},
5959
},
6060
regexpLabels: defaultRegexpLabels,
@@ -75,8 +75,8 @@ func TestComputeIssueUpdates(t *testing.T) {
7575
name: "no listed resources",
7676
issues: []*github.Issue{
7777
{
78-
Number: github.Int(1),
79-
Body: github.String("Body with unusual structure"),
78+
Number: github.Ptr(1),
79+
Body: github.Ptr("Body with unusual structure"),
8080
},
8181
},
8282
regexpLabels: defaultRegexpLabels,
@@ -87,14 +87,14 @@ func TestComputeIssueUpdates(t *testing.T) {
8787
description: "issues with service/terraform shouldn't get new labels",
8888
issues: []*github.Issue{
8989
{
90-
Number: github.Int(1),
90+
Number: github.Ptr(1),
9191
Body: testIssueBodyWithResources([]string{"google_service1_resource1"}),
92-
Labels: []*github.Label{{Name: github.String("service/terraform")}},
92+
Labels: []*github.Label{{Name: github.Ptr("service/terraform")}},
9393
},
9494
{
95-
Number: github.Int(2),
95+
Number: github.Ptr(2),
9696
Body: testIssueBodyWithResources([]string{"google_service1_resource1"}),
97-
Labels: []*github.Label{{Name: github.String("forward/exempt")}},
97+
Labels: []*github.Label{{Name: github.Ptr("forward/exempt")}},
9898
},
9999
},
100100
regexpLabels: defaultRegexpLabels,
@@ -105,11 +105,11 @@ func TestComputeIssueUpdates(t *testing.T) {
105105
description: "issues with affected resources should normally get new labels added",
106106
issues: []*github.Issue{
107107
{
108-
Number: github.Int(1),
108+
Number: github.Ptr(1),
109109
Body: testIssueBodyWithResources([]string{"google_service1_resource1"}),
110110
},
111111
{
112-
Number: github.Int(2),
112+
Number: github.Ptr(2),
113113
Body: testIssueBodyWithResources([]string{"google_service2_resource1"}),
114114
},
115115
},
@@ -130,14 +130,14 @@ func TestComputeIssueUpdates(t *testing.T) {
130130
description: "don't update issues if all expected service labels are already present",
131131
issues: []*github.Issue{
132132
{
133-
Number: github.Int(1),
133+
Number: github.Ptr(1),
134134
Body: testIssueBodyWithResources([]string{"google_service1_resource1"}),
135-
Labels: []*github.Label{{Name: github.String("service/service1")}},
135+
Labels: []*github.Label{{Name: github.Ptr("service/service1")}},
136136
},
137137
{
138-
Number: github.Int(2),
138+
Number: github.Ptr(2),
139139
Body: testIssueBodyWithResources([]string{"google_service2_resource1"}),
140-
Labels: []*github.Label{{Name: github.String("service/service2-subteam1")}},
140+
Labels: []*github.Label{{Name: github.Ptr("service/service2-subteam1")}},
141141
},
142142
},
143143
regexpLabels: defaultRegexpLabels,
@@ -148,14 +148,14 @@ func TestComputeIssueUpdates(t *testing.T) {
148148
description: "add missing service labels",
149149
issues: []*github.Issue{
150150
{
151-
Number: github.Int(1),
151+
Number: github.Ptr(1),
152152
Body: testIssueBodyWithResources([]string{"google_service1_resource1"}),
153-
Labels: []*github.Label{{Name: github.String("service/service2-subteam1")}},
153+
Labels: []*github.Label{{Name: github.Ptr("service/service2-subteam1")}},
154154
},
155155
{
156-
Number: github.Int(2),
156+
Number: github.Ptr(2),
157157
Body: testIssueBodyWithResources([]string{"google_service2_resource2"}),
158-
Labels: []*github.Label{{Name: github.String("service/service1")}},
158+
Labels: []*github.Label{{Name: github.Ptr("service/service1")}},
159159
},
160160
},
161161
regexpLabels: defaultRegexpLabels,
@@ -177,9 +177,9 @@ func TestComputeIssueUpdates(t *testing.T) {
177177
description: "don't add missing service labels if already linked",
178178
issues: []*github.Issue{
179179
{
180-
Number: github.Int(1),
180+
Number: github.Ptr(1),
181181
Body: testIssueBodyWithResources([]string{"google_service1_resource1"}),
182-
Labels: []*github.Label{{Name: github.String("service/service2-subteam1")}, {Name: github.String("forward/linked")}},
182+
Labels: []*github.Label{{Name: github.Ptr("service/service2-subteam1")}, {Name: github.Ptr("forward/linked")}},
183183
},
184184
},
185185
regexpLabels: defaultRegexpLabels,
@@ -190,14 +190,14 @@ func TestComputeIssueUpdates(t *testing.T) {
190190
description: "add service labels if missed but don't add forward/review label for test failure ticket",
191191
issues: []*github.Issue{
192192
{
193-
Number: github.Int(1),
193+
Number: github.Ptr(1),
194194
Body: testIssueBodyWithResources([]string{"google_service1_resource1"}),
195-
Labels: []*github.Label{{Name: github.String("test-failure")}, {Name: github.String("test-failure-100")}},
195+
Labels: []*github.Label{{Name: github.Ptr("test-failure")}, {Name: github.Ptr("test-failure-100")}},
196196
},
197197
{
198-
Number: github.Int(2),
198+
Number: github.Ptr(2),
199199
Body: testIssueBodyWithResources([]string{"google_service2_resource1"}),
200-
Labels: []*github.Label{{Name: github.String("test-failure")}, {Name: github.String("test-failure-50")}, {Name: github.String("service/service2-subteam1")}},
200+
Labels: []*github.Label{{Name: github.Ptr("test-failure")}, {Name: github.Ptr("test-failure-50")}, {Name: github.Ptr("service/service2-subteam1")}},
201201
},
202202
},
203203
regexpLabels: defaultRegexpLabels,

tools/issue-labeler/labeler/github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os"
77
"strings"
88

9-
"github.com/google/go-github/v61/github"
9+
"github.com/google/go-github/v68/github"
1010
"golang.org/x/oauth2"
1111
)
1212

tools/issue-labeler/labeler/labels.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
_ "embed"
1111

1212
"github.com/golang/glog"
13-
"github.com/google/go-github/v61/github"
13+
"github.com/google/go-github/v68/github"
1414
"gopkg.in/yaml.v2"
1515
)
1616

0 commit comments

Comments
 (0)