minimalNode returns a minimal JSON discussion node with the given id and title.
(id, title string)
| 22 | |
| 23 | // minimalNode returns a minimal JSON discussion node with the given id and title. |
| 24 | func minimalNode(id, title string) string { |
| 25 | return heredoc.Docf(` |
| 26 | { |
| 27 | "id": %q, |
| 28 | "number": 1, |
| 29 | "title": %q, |
| 30 | "body": "", |
| 31 | "url": "", |
| 32 | "closed": false, |
| 33 | "stateReason": "", |
| 34 | "isAnswered": false, |
| 35 | "answerChosenAt": "0001-01-01T00:00:00Z", |
| 36 | "author": { |
| 37 | "__typename": "User", |
| 38 | "login": "alice" |
| 39 | }, |
| 40 | "category": { |
| 41 | "id": "C1", |
| 42 | "name": "General", |
| 43 | "slug": "general", |
| 44 | "emoji": "", |
| 45 | "isAnswerable": false |
| 46 | }, |
| 47 | "answerChosenBy": null, |
| 48 | "labels": { |
| 49 | "nodes": [] |
| 50 | }, |
| 51 | "reactionGroups": [], |
| 52 | "createdAt": "2024-01-01T00:00:00Z", |
| 53 | "updatedAt": "2024-01-01T00:00:00Z", |
| 54 | "closedAt": "0001-01-01T00:00:00Z", |
| 55 | "locked": false |
| 56 | } |
| 57 | `, id, title) |
| 58 | } |
| 59 | |
| 60 | // minimalNodes returns count comma-separated minimal JSON discussion nodes. |
| 61 | func minimalNodes(count int) string { |
no outgoing calls
no test coverage detected