@@ -62,7 +62,7 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
62
62
}
63
63
64
64
// Now execute the discussions query
65
- var discussions []* github.Issue
65
+ var discussions []* github.Discussion
66
66
if categoryID != nil {
67
67
// Query with category filter (server-side filtering)
68
68
var query struct {
@@ -89,17 +89,15 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
89
89
return mcp .NewToolResultError (err .Error ()), nil
90
90
}
91
91
92
- // Map nodes to GitHub Issue objects
92
+ // Map nodes to GitHub Discussion objects
93
93
for _ , n := range query .Repository .Discussions .Nodes {
94
- di := & github.Issue {
94
+ di := & github.Discussion {
95
95
Number : github .Ptr (int (n .Number )),
96
96
Title : github .Ptr (string (n .Title )),
97
97
HTMLURL : github .Ptr (string (n .URL )),
98
98
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 )),
103
101
},
104
102
}
105
103
discussions = append (discussions , di )
@@ -129,17 +127,15 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
129
127
return mcp .NewToolResultError (err .Error ()), nil
130
128
}
131
129
132
- // Map nodes to GitHub Issue objects
130
+ // Map nodes to GitHub Discussion objects
133
131
for _ , n := range query .Repository .Discussions .Nodes {
134
- di := & github.Issue {
132
+ di := & github.Discussion {
135
133
Number : github .Ptr (int (n .Number )),
136
134
Title : github .Ptr (string (n .Title )),
137
135
HTMLURL : github .Ptr (string (n .URL )),
138
136
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 )),
143
139
},
144
140
}
145
141
discussions = append (discussions , di )
0 commit comments