| 97 | } |
| 98 | |
| 99 | func fragmentToDiscussion(fragment NodeFragment) *github.Discussion { |
| 100 | return &github.Discussion{ |
| 101 | Number: github.Ptr(int(fragment.Number)), |
| 102 | Title: github.Ptr(string(fragment.Title)), |
| 103 | HTMLURL: github.Ptr(string(fragment.URL)), |
| 104 | CreatedAt: &github.Timestamp{Time: fragment.CreatedAt.Time}, |
| 105 | UpdatedAt: &github.Timestamp{Time: fragment.UpdatedAt.Time}, |
| 106 | User: &github.User{ |
| 107 | Login: github.Ptr(string(fragment.Author.Login)), |
| 108 | }, |
| 109 | DiscussionCategory: &github.DiscussionCategory{ |
| 110 | Name: github.Ptr(string(fragment.Category.Name)), |
| 111 | }, |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | func getQueryType(useOrdering bool, categoryID *githubv4.ID) any { |
| 116 | if categoryID != nil && useOrdering { |