Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: get_discussion graphQL invalid field#648

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

Merged
LuluBeatson merged 3 commits intomainfromlulu/get-discussion
Jul 7, 2025

Conversation

LuluBeatson
Copy link
Contributor

@LuluBeatsonLuluBeatson commentedJul 7, 2025
edited
Loading

Fixes bug inget_discussion which caused tool error and returned:

Field 'state' doesn't exist on type 'Discussion'

  • Removed "state" field from query and response
  • Usedgithub.Discussion object instead ofgithub.Issue
  • Corrected "labels" to "category" in response
  • Tool arguments and descriptions unchanged.
Before with bugimage

Now fixed:

image

@LuluBeatsonLuluBeatson changed the titleLulu/get discussionfix: get_discussion graphQL invalid fieldJul 7, 2025
@LuluBeatsonLuluBeatson marked this pull request as ready for reviewJuly 7, 2025 12:45
@CopilotCopilotAI review requested due to automatic review settingsJuly 7, 2025 12:45
@LuluBeatsonLuluBeatson requested a review froma team as acode ownerJuly 7, 2025 12:45
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

The PR fixes the GraphQL query and response handling inget_discussion by removing the invalidstate field and replacing the oldlabels approach with a propercategory mapping.

  • Removedstate from both query and response struct.
  • Switched fromgithub.Issue togithub.Discussion return type and updated corresponding fields.
  • Updated tests to reflect the newDiscussionCategory field instead of labels and state.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

FileDescription
pkg/github/discussions.goRemovedState field, switched togithub.Discussion, and mappedCategory directly.
pkg/github/discussions_test.goUpdated test expectations: changed type toDiscussion, removedState, and asserted onDiscussionCategory.
Comments suppressed due to low confidence (2)

pkg/github/discussions.go:215

  • The function doc comment still refers to returning an issue. Please update any surrounding comments or docs to reflect that this now returns aDiscussion struct rather than anIssue.
discussion := &github.Discussion{

pkg/github/discussions_test.go:270

  • [nitpick] Consider using a pointer (var out *github.Discussion) when unmarshalling JSON into a pointer type; this aligns with yourexpected pointer and avoids extra dereferencing in assertions.
var out github.Discussion

@LuluBeatsonLuluBeatson merged commit3730b84 intomainJul 7, 2025
16 checks passed
@LuluBeatsonLuluBeatson deleted the lulu/get-discussion branchJuly 7, 2025 13:43
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@omgitsadsomgitsadsomgitsads approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@LuluBeatson@omgitsads

[8]ページ先頭

©2009-2025 Movatter.jp