diff --git a/internal/discussion/gqlclient.go b/internal/discussion/gqlclient.go
index c0e92e2..9cc216d 100644
--- a/internal/discussion/gqlclient.go
+++ b/internal/discussion/gqlclient.go
@@ -147,7 +147,7 @@
if !page.PageInfo.HasNextPage {
return
}
- vars[q.CursorName()] = gql.NewString(page.PageInfo.EndCursor)
+ vars[q.CursorName()] = new(page.PageInfo.EndCursor)
}
}
}
diff --git a/internal/overview/poster_test.go b/internal/overview/poster_test.go
index c171e75..6aff167 100644
--- a/internal/overview/poster_test.go
+++ b/internal/overview/poster_test.go
@@ -72,7 +72,7 @@
wantReport: &actions.RunReport{
Completed: 2,
},
- autoApprove: ptr(true),
+ autoApprove: new(true),
wantEdits: []*github.TestingEdit{
{Project: project, Issue: 1, IssueCommentChanges: &github.IssueCommentChanges{
Body: mustComment(t, `an overview of issue 1 with 2 comment(s)`, w),
@@ -99,7 +99,7 @@
gh.Testing().AddIssue(project, &github.Issue{Number: 2, Body: "issue 2", CreatedAt: dec31_2022})
gh.Testing().AddIssueComment(project, 2, &github.IssueComment{Body: "issue 2 comment 1"})
},
- autoApprove: ptr(true),
+ autoApprove: new(true),
wantReport: &actions.RunReport{
Completed: 1,
},
@@ -123,8 +123,8 @@
gh.Testing().AddIssue(project, &github.Issue{Number: 2, Body: "issue 2", CreatedAt: dec30_2023})
gh.Testing().AddIssueComment(project, 2, &github.IssueComment{Body: "issue 2 comment 1"})
},
- autoApprove: ptr(true),
- maxAge: ptr(time.Hour * 24),
+ autoApprove: new(true),
+ maxAge: new(time.Hour * 24),
wantReport: &actions.RunReport{
Completed: 1,
},
@@ -176,10 +176,6 @@
}
}
-func ptr[T any](v T) *T {
- return &v
-}
-
func mustComment(t *testing.T, s string, w *wrap.Wrapper) string {
t.Helper()
c, err := comment(s, w)