@@ -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
1313func 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 ,
0 commit comments