Add discussion command group scaffolding#13082
Merged
Merged
Conversation
f3eb1a1 to
7cca864
Compare
Introduce the pkg/cmd/discussion/ package with: - DiscussionClient interface and domain types (client/) - Generated mock via moq (client/) - Factory function for lazy client creation (shared/) - JSON field definitions for --json output (shared/) - Root 'discussion' command registered in the core group The interface defines all planned operations (list, search, get, create, update, close, reopen, comment, lock, unlock, mark-answer, unmark-answer) with stub implementations that will be replaced as each subcommand is added in subsequent PRs. Domain types are intentionally separate from API types per review guidance. No JSON struct tags are used; serialization is handled by ExportData methods. Refs: cli#12810, github/gh-cli-and-desktop#115 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7cca864 to
45c68b4
Compare
babakks
approved these changes
Apr 2, 2026
Member
babakks
left a comment
There was a problem hiding this comment.
LGTM! 🙏 I know it's still draft, but I guess most of the scaffolding is done here, so I'm approving it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scaffolding for the
gh discussioncommand group — the first PR in a series that will bring native Discussions support to the CLI.What's included
DiscussionClientinterface inpkg/cmd/discussion/client/— defines all planned operations (list, search, get, create, update, close, reopen, comment, lock/unlock, mark/unmark-answer) with stub implementationsDiscussion,DiscussionCategory,DiscussionComment, etc. withExportDatafor JSON output. No JSON struct tags per review guidance — serialization is explicitmoqfor use in subcommand testsshared/for lazy client creation--jsonoutputcoregroup alongsideissueandprArchitecture
Follows the
agent-task/capipattern per reviewer guidance:What's next
This is PR 1 of 11. See #12810 for the design proposal.
Next:
discussion list(PR 2)Refs: #12810