@@ -47,8 +47,8 @@ func TestGetOpenPullRequestsForSHA(t *testing.T) {
4747 sha := "sha"
4848
4949 pr := & github.PullRequest {
50- State : github . Ptr ("open" ),
51- Head : & github.PullRequestBranch {SHA : github . Ptr (sha )},
50+ State : new ("open "),
51+ Head : & github.PullRequestBranch {SHA : new (sha )},
5252 }
5353
5454 mockClient .On ("ListPullRequestsWithCommit" , ctx , owner , repo , sha , mock .Anything ).Return ([]* github.PullRequest {pr }, & github.Response {NextPage : 0 }, nil )
@@ -69,8 +69,8 @@ func TestListOpenPullRequestsForSHA(t *testing.T) {
6969 sha := "sha"
7070
7171 pr := & github.PullRequest {
72- State : github . Ptr ("open" ),
73- Head : & github.PullRequestBranch {SHA : github . Ptr (sha )},
72+ State : new ("open "),
73+ Head : & github.PullRequestBranch {SHA : new (sha )},
7474 }
7575
7676 mockClient .On ("List" , ctx , owner , repo , mock .Anything ).Return ([]* github.PullRequest {pr }, & github.Response {NextPage : 0 }, nil )
@@ -91,8 +91,8 @@ func TestGetAllPossibleOpenPullRequestsForSHA_FirstMethodReturnsResults(t *testi
9191 sha := "sha"
9292
9393 pr := & github.PullRequest {
94- State : github . Ptr ("open" ),
95- Head : & github.PullRequestBranch {SHA : github . Ptr (sha )},
94+ State : new ("open "),
95+ Head : & github.PullRequestBranch {SHA : new (sha )},
9696 }
9797
9898 // Mock the first method to return a valid pull request.
@@ -116,8 +116,8 @@ func TestGetAllPossibleOpenPullRequestsForSHA_SecondMethodReturnsResults(t *test
116116 sha := "sha"
117117
118118 pr := & github.PullRequest {
119- State : github . Ptr ("open" ),
120- Head : & github.PullRequestBranch {SHA : github . Ptr (sha )},
119+ State : new ("open "),
120+ Head : & github.PullRequestBranch {SHA : new (sha )},
121121 }
122122
123123 // Mock the first method to return no results.
@@ -178,8 +178,8 @@ func TestListOpenPullRequestsForRef(t *testing.T) {
178178 ref := "refs/heads/main"
179179
180180 pr := & github.PullRequest {
181- State : github . Ptr ("open" ),
182- Base : & github.PullRequestBranch {Ref : github . Ptr ("main" )},
181+ State : new ("open "),
182+ Base : & github.PullRequestBranch {Ref : new ("main ")},
183183 }
184184
185185 mockClient .On ("List" , ctx , owner , repo , mock .Anything ).Return ([]* github.PullRequest {pr }, & github.Response {NextPage : 0 }, nil )
0 commit comments