@@ -168,6 +168,45 @@ pub mod docs_update_queries {
168
168
pub after : Option < String > ,
169
169
}
170
170
171
+ /// Query for fetching recent commits and their associated PRs.
172
+ ///
173
+ /// This query is built from:
174
+ ///
175
+ /// ```text
176
+ /// query RecentCommits($name: String!, $owner: String!, $branch: String!, $after: String) {
177
+ /// repository(name: $name, owner: $owner) {
178
+ /// ref(qualifiedName: $branch) {
179
+ /// target {
180
+ /// ... on Commit {
181
+ /// history(first: 100, after: $after) {
182
+ /// totalCount
183
+ /// pageInfo {
184
+ /// hasNextPage
185
+ /// endCursor
186
+ /// }
187
+ /// nodes {
188
+ /// oid
189
+ /// parents(first: 1) {
190
+ /// nodes {
191
+ /// oid
192
+ /// }
193
+ /// }
194
+ /// committedDate
195
+ /// messageHeadline
196
+ /// associatedPullRequests(first: 1) {
197
+ /// nodes {
198
+ /// number
199
+ /// title
200
+ /// }
201
+ /// }
202
+ /// }
203
+ /// }
204
+ /// }
205
+ /// }
206
+ /// }
207
+ /// }
208
+ /// }
209
+ /// ```
171
210
#[ derive( cynic:: QueryFragment , Debug ) ]
172
211
#[ cynic( graphql_type = "Query" , argument_struct = "RecentCommitsArguments" ) ]
173
212
pub struct RecentCommits {
@@ -184,13 +223,15 @@ pub mod docs_update_queries {
184
223
}
185
224
186
225
#[ derive( cynic:: QueryFragment , Debug ) ]
226
+ #[ cynic( argument_struct = "RecentCommitsArguments" ) ]
187
227
pub struct Ref {
188
228
pub target : Option < GitObject > ,
189
229
}
190
230
191
231
#[ derive( cynic:: QueryFragment , Debug ) ]
232
+ #[ cynic( argument_struct = "RecentCommitsArguments" ) ]
192
233
pub struct Commit {
193
- #[ arguments( first = 100 ) ]
234
+ #[ arguments( first = 100 , after = & args . after ) ]
194
235
pub history : CommitHistoryConnection ,
195
236
}
196
237
@@ -236,6 +277,7 @@ pub mod docs_update_queries {
236
277
}
237
278
238
279
#[ derive( cynic:: InlineFragments , Debug ) ]
280
+ #[ cynic( argument_struct = "RecentCommitsArguments" ) ]
239
281
pub enum GitObject {
240
282
Commit ( Commit ) ,
241
283
// These three variants are here just to pacify cynic. I don't know
0 commit comments