Skip to content

Commit 1dd2552

Browse files
committed
Fix lint issues
1 parent d798f7f commit 1dd2552

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

pkg/github/discussions.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
6969
mcp.WithDescription(t("TOOL_LIST_DISCUSSIONS_DESCRIPTION", "List discussions for a repository")),
7070
mcp.WithToolAnnotation(mcp.ToolAnnotation{
7171
Title: t("TOOL_LIST_DISCUSSIONS_USER_TITLE", "List discussions"),
72-
ReadOnlyHint: toBoolPtr(true),
72+
ReadOnlyHint: ToBoolPtr(true),
7373
}),
7474
mcp.WithString("owner",
7575
mcp.Required(),
@@ -232,7 +232,7 @@ func GetDiscussion(getGQLClient GetGQLClientFn, t translations.TranslationHelper
232232
mcp.WithDescription(t("TOOL_GET_DISCUSSION_DESCRIPTION", "Get a specific discussion by ID")),
233233
mcp.WithToolAnnotation(mcp.ToolAnnotation{
234234
Title: t("TOOL_GET_DISCUSSION_USER_TITLE", "Get discussion"),
235-
ReadOnlyHint: toBoolPtr(true),
235+
ReadOnlyHint: ToBoolPtr(true),
236236
}),
237237
mcp.WithString("owner",
238238
mcp.Required(),
@@ -303,7 +303,7 @@ func GetDiscussionComments(getGQLClient GetGQLClientFn, t translations.Translati
303303
mcp.WithDescription(t("TOOL_GET_DISCUSSION_COMMENTS_DESCRIPTION", "Get comments from a discussion")),
304304
mcp.WithToolAnnotation(mcp.ToolAnnotation{
305305
Title: t("TOOL_GET_DISCUSSION_COMMENTS_USER_TITLE", "Get discussion comments"),
306-
ReadOnlyHint: toBoolPtr(true),
306+
ReadOnlyHint: ToBoolPtr(true),
307307
}),
308308
mcp.WithString("owner", mcp.Required(), mcp.Description("Repository owner")),
309309
mcp.WithString("repo", mcp.Required(), mcp.Description("Repository name")),
@@ -363,7 +363,7 @@ func ListDiscussionCategories(getGQLClient GetGQLClientFn, t translations.Transl
363363
mcp.WithDescription(t("TOOL_LIST_DISCUSSION_CATEGORIES_DESCRIPTION", "List discussion categories with their id and name, for a repository")),
364364
mcp.WithToolAnnotation(mcp.ToolAnnotation{
365365
Title: t("TOOL_LIST_DISCUSSION_CATEGORIES_USER_TITLE", "List discussion categories"),
366-
ReadOnlyHint: toBoolPtr(true),
366+
ReadOnlyHint: ToBoolPtr(true),
367367
}),
368368
mcp.WithString("owner",
369369
mcp.Required(),

pkg/github/discussions_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func Test_ListDiscussions(t *testing.T) {
148148
reqParams map[string]interface{}
149149
response githubv4mock.GQLResponse
150150
expectError bool
151-
expectedIds []int64
151+
expectedIDs []int64
152152
errContains string
153153
catMatcher githubv4mock.Matcher
154154
}{
@@ -161,7 +161,7 @@ func Test_ListDiscussions(t *testing.T) {
161161
},
162162
response: mockResponseListAll,
163163
expectError: false,
164-
expectedIds: []int64{1, 2, 3},
164+
expectedIDs: []int64{1, 2, 3},
165165
catMatcher: catMatcher,
166166
},
167167
{
@@ -186,7 +186,7 @@ func Test_ListDiscussions(t *testing.T) {
186186
},
187187
response: mockResponseCategory,
188188
expectError: false,
189-
expectedIds: []int64{1},
189+
expectedIDs: []int64{1},
190190
catMatcher: catMatcher,
191191
},
192192
{
@@ -199,7 +199,7 @@ func Test_ListDiscussions(t *testing.T) {
199199
},
200200
response: mockResponseListAll,
201201
expectError: false,
202-
expectedIds: []int64{2, 3},
202+
expectedIDs: []int64{2, 3},
203203
catMatcher: catMatcher,
204204
},
205205
{
@@ -282,16 +282,16 @@ func Test_ListDiscussions(t *testing.T) {
282282
err = json.Unmarshal([]byte(text), &returnedDiscussions)
283283
require.NoError(t, err)
284284

285-
assert.Len(t, returnedDiscussions, len(tc.expectedIds), "Expected %d discussions, got %d", len(tc.expectedIds), len(returnedDiscussions))
285+
assert.Len(t, returnedDiscussions, len(tc.expectedIDs), "Expected %d discussions, got %d", len(tc.expectedIDs), len(returnedDiscussions))
286286

287287
// If no discussions are expected, skip further checks
288-
if len(tc.expectedIds) == 0 {
288+
if len(tc.expectedIDs) == 0 {
289289
return
290290
}
291291

292292
// Create a map of expected IDs for easier checking
293293
expectedIDMap := make(map[int64]bool)
294-
for _, id := range tc.expectedIds {
294+
for _, id := range tc.expectedIDs {
295295
expectedIDMap[id] = true
296296
}
297297

0 commit comments

Comments
 (0)