Skip to content

Commit e15b340

Browse files
committed
rm State which does not exist on type Discussion
1 parent 39d7fec commit e15b340

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

pkg/github/discussions.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ func GetDiscussion(getGQLClient GetGQLClientFn, t translations.TranslationHelper
195195
Discussion struct {
196196
Number githubv4.Int
197197
Body githubv4.String
198-
State githubv4.String
199198
CreatedAt githubv4.DateTime
200199
URL githubv4.String `graphql:"url"`
201200
Category struct {
@@ -213,16 +212,13 @@ func GetDiscussion(getGQLClient GetGQLClientFn, t translations.TranslationHelper
213212
return mcp.NewToolResultError(err.Error()), nil
214213
}
215214
d := q.Repository.Discussion
216-
discussion := &github.Issue{
215+
discussion := &github.Discussion{
217216
Number: github.Ptr(int(d.Number)),
218217
Body: github.Ptr(string(d.Body)),
219-
State: github.Ptr(string(d.State)),
220218
HTMLURL: github.Ptr(string(d.URL)),
221219
CreatedAt: &github.Timestamp{Time: d.CreatedAt.Time},
222-
Labels: []*github.Label{
223-
{
224-
Name: github.Ptr(fmt.Sprintf("category:%s", string(d.Category.Name))),
225-
},
220+
DiscussionCategory: &github.DiscussionCategory{
221+
Name: github.Ptr(string(d.Category.Name)),
226222
},
227223
}
228224
out, err := json.Marshal(discussion)

0 commit comments

Comments
 (0)