Skip to content

Commit 687ee8f

Browse files
committed
added updatedAt and Author (aka User) login to query and payload
1 parent d15026b commit 687ee8f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pkg/github/discussions.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
7272
Number githubv4.Int
7373
Title githubv4.String
7474
CreatedAt githubv4.DateTime
75+
UpdatedAt githubv4.DateTime
76+
Author struct {
77+
Login githubv4.String
78+
}
7579
Category struct {
7680
Name githubv4.String
7781
} `graphql:"category"`
@@ -96,6 +100,10 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
96100
Title: github.Ptr(string(n.Title)),
97101
HTMLURL: github.Ptr(string(n.URL)),
98102
CreatedAt: &github.Timestamp{Time: n.CreatedAt.Time},
103+
UpdatedAt: &github.Timestamp{Time: n.UpdatedAt.Time},
104+
User: &github.User{
105+
Login: github.Ptr(string(n.Author.Login)),
106+
},
99107
DiscussionCategory: &github.DiscussionCategory{
100108
Name: github.Ptr(string(n.Category.Name)),
101109
},
@@ -111,6 +119,10 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
111119
Number githubv4.Int
112120
Title githubv4.String
113121
CreatedAt githubv4.DateTime
122+
UpdatedAt githubv4.DateTime
123+
Author struct {
124+
Login githubv4.String
125+
}
114126
Category struct {
115127
Name githubv4.String
116128
} `graphql:"category"`
@@ -134,6 +146,10 @@ func ListDiscussions(getGQLClient GetGQLClientFn, t translations.TranslationHelp
134146
Title: github.Ptr(string(n.Title)),
135147
HTMLURL: github.Ptr(string(n.URL)),
136148
CreatedAt: &github.Timestamp{Time: n.CreatedAt.Time},
149+
UpdatedAt: &github.Timestamp{Time: n.UpdatedAt.Time},
150+
User: &github.User{
151+
Login: github.Ptr(string(n.Author.Login)),
152+
},
137153
DiscussionCategory: &github.DiscussionCategory{
138154
Name: github.Ptr(string(n.Category.Name)),
139155
},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy