MCPcopy Index your code
hub / github.com/cli/cli / exampleAnswerableDiscussion

Function exampleAnswerableDiscussion

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

Source from the content-addressed store, hash-verified

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

Callers 3

TestViewRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected