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

Function exampleUnanswerableDiscussion

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

Source from the content-addressed store, hash-verified

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

Callers 1

TestViewRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected