- Notifications
You must be signed in to change notification settings - Fork2.7k
Add title field to discussion in get_discussion tool#803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Add title field to discussion in get_discussion tool#803
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR adds thetitle
field to the GraphQL query in theget_discussion
tool to prevent model hallucination when retrieving GitHub discussion information. The change ensures that discussion titles are properly fetched and included in the response rather than being fabricated by the model.
- Add
title
field to the GraphQL query structure and response mapping - Update test cases to include title field validation
- Ensure consistent retrieval of discussion metadata
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
pkg/github/discussions.go | Add title field to GraphQL query structure and response mapping |
pkg/github/discussions_test.go | Update test query string and test data to include title field validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
lgtm! 🚀
ff6e859
intogithub:mainUh oh!
There was an error while loading.Please reload this page.
Closes#802
Overview
This PR adds the discussion
title
field to the query in theget_discussion
tool. Without it, the model seems to hallucinate title information (see screenshot below), and in general this seems like an important field for this toolDemos using this discussionhttps://github.com/facebook/react/discussions/34039
Before (model hallucination)

After (retrieves title correctly)
