MCPcopy Create free account
hub / github.com/cli/cli / exampleAnswerableDiscussion

Function exampleAnswerableDiscussion

pkg/cmd/discussion/view/view_test.go:1181–1203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1179}
1180
1181func exampleAnswerableDiscussion() *client.Discussion {
1182 return &client.Discussion{
1183 ID: "D_123",
1184 Number: 123,
1185 Title: "an interesting question",
1186 Body: "about my interesting question",
1187 URL: "https://github.com/OWNER/REPO/discussions/123",
1188 Closed: false,
1189 Author: client.DiscussionActor{Login: "monalisa"},
1190 Category: client.DiscussionCategory{
1191 Name: "Q&A", Slug: "q-a", IsAnswerable: true,
1192 },
1193 Labels: []client.DiscussionLabel{{Name: "help-wanted", Color: "0075ca"}},
1194 Answered: false,
1195 Comments: client.DiscussionCommentList{TotalCount: 3},
1196 ReactionGroups: []client.ReactionGroup{
1197 {Content: "THUMBS_UP", TotalCount: 5},
1198 {Content: "ROCKET", TotalCount: 2},
1199 },
1200 CreatedAt: time.Date(2025, 3, 1, 0, 0, 0, 0, time.UTC),
1201 UpdatedAt: time.Date(2025, 3, 1, 0, 0, 0, 0, time.UTC),
1202 }
1203}
1204
1205func exampleUnanswerableDiscussion() *client.Discussion {
1206 return &client.Discussion{

Callers 3

TestViewRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected