@@ -62,7 +62,7 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
6262 }
6363
6464 // Now execute the discussions query
65- var discussions []* github.Issue
65+ var discussions []* github.Discussion
6666 if categoryID != nil {
6767 // Query with category filter (server-side filtering)
6868 var query struct {
@@ -89,17 +89,15 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
8989 return mcp .NewToolResultError (err .Error ()), nil
9090 }
9191
92- // Map nodes to GitHub Issue objects
92+ // Map nodes to GitHub Discussion objects
9393 for _ , n := range query .Repository .Discussions .Nodes {
94- di := & github.Issue {
94+ di := & github.Discussion {
9595 Number : github .Ptr (int (n .Number )),
9696 Title : github .Ptr (string (n .Title )),
9797 HTMLURL : github .Ptr (string (n .URL )),
9898 CreatedAt : & github.Timestamp {Time : n .CreatedAt .Time },
99- Labels : []* github.Label {
100- {
101- Name : github .Ptr (fmt .Sprintf ("category:%s" , string (n .Category .Name ))),
102- },
99+ DiscussionCategory : & github.DiscussionCategory {
100+ Name : github .Ptr (string (n .Category .Name )),
103101 },
104102 }
105103 discussions = append (discussions , di )
@@ -129,17 +127,15 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
129127 return mcp .NewToolResultError (err .Error ()), nil
130128 }
131129
132- // Map nodes to GitHub Issue objects
130+ // Map nodes to GitHub Discussion objects
133131 for _ , n := range query .Repository .Discussions .Nodes {
134- di := & github.Issue {
132+ di := & github.Discussion {
135133 Number : github .Ptr (int (n .Number )),
136134 Title : github .Ptr (string (n .Title )),
137135 HTMLURL : github .Ptr (string (n .URL )),
138136 CreatedAt : & github.Timestamp {Time : n .CreatedAt .Time },
139- Labels : []* github.Label {
140- {
141- Name : github .Ptr (fmt .Sprintf ("category:%s" , string (n .Category .Name ))),
142- },
137+ DiscussionCategory : & github.DiscussionCategory {
138+ Name : github .Ptr (string (n .Category .Name )),
143139 },
144140 }
145141 discussions = append (discussions , di )
0 commit comments