MCPcopy
hub / github.com/cli/cli / exampleUnanswerableDiscussion

Function exampleUnanswerableDiscussion

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

Source from the content-addressed store, hash-verified

1198}
1199
1200func exampleUnanswerableDiscussion() *client.Discussion {
1201 return &client.Discussion{
1202 ID: "D_123",
1203 Number: 123,
1204 Title: "a cool discussion",
1205 Body: "about my cool idea",
1206 URL: "https://github.com/OWNER/REPO/discussions/123",
1207 Closed: false,
1208 Author: client.DiscussionActor{Login: "monalisa"},
1209 Category: client.DiscussionCategory{
1210 Name: "General", Slug: "general", IsAnswerable: false,
1211 },
1212 Labels: []client.DiscussionLabel{{Name: "help-wanted", Color: "0075ca"}},
1213 Answered: false,
1214 Comments: client.DiscussionCommentList{TotalCount: 3},
1215 ReactionGroups: []client.ReactionGroup{
1216 {Content: "THUMBS_UP", TotalCount: 5},
1217 {Content: "ROCKET", TotalCount: 2},
1218 },
1219 CreatedAt: time.Date(2025, 3, 1, 0, 0, 0, 0, time.UTC),
1220 UpdatedAt: time.Date(2025, 3, 1, 0, 0, 0, 0, time.UTC),
1221 }
1222}
1223
1224func compactJSON(s string) string {
1225 var buf bytes.Buffer

Callers 1

TestViewRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected