Skip to content

Commit 235e249

Browse files
test(context): avoid generic pointer inference lint
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 44b48b2 commit 235e249

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎pkg/github/context_tools_test.go‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,11 @@ func Test_GetMe(t *testing.T) {
144144
func Test_GetMe_OmittedArguments(t *testing.T) {
145145
t.Parallel()
146146

147+
login := "testuser"
148+
profileURL := "https://github.com/testuser"
147149
mockUser := &github.User{
148-
Login: github.Ptr("testuser"),
149-
HTMLURL: github.Ptr("https://github.com/testuser"),
150+
Login: &login,
151+
HTMLURL: &profileURL,
150152
CreatedAt: &github.Timestamp{Time: time.Now()},
151153
}
152154
mockedClient := MockHTTPClientWithHandlers(map[string]http.HandlerFunc{
@@ -171,9 +173,11 @@ func Test_GetMe_OmittedArguments(t *testing.T) {
171173
}
172174

173175
func TestContextToolsTypedRegistration(t *testing.T) {
176+
login := "testuser"
177+
profileURL := "https://github.com/testuser"
174178
mockUser := &github.User{
175-
Login: github.Ptr("testuser"),
176-
HTMLURL: github.Ptr("https://github.com/testuser"),
179+
Login: &login,
180+
HTMLURL: &profileURL,
177181
CreatedAt: &github.Timestamp{Time: time.Now()},
178182
}
179183
teamsMatcher := githubv4mock.NewQueryMatcher(

0 commit comments

Comments
 (0)