44using System . IO ;
55using System . Linq ;
66using System . Reactive . Linq ;
7+ using System . Threading ;
78using System . Threading . Tasks ;
89using GitHub . Api ;
910using GitHub . Extensions ;
@@ -69,8 +70,8 @@ public async Task<ViewerRepositoriesModel> ReadViewerRepositories(HostAddress ad
6970 {
7071 var order = new RepositoryOrder
7172 {
72- Field = RepositoryOrderField . Name ,
73- Direction = OrderDirection . Asc
73+ Field = RepositoryOrderField . PushedAt ,
74+ Direction = OrderDirection . Desc
7475 } ;
7576
7677 var affiliation = new RepositoryAffiliation ? [ ]
@@ -94,14 +95,17 @@ public async Task<ViewerRepositoriesModel> ReadViewerRepositories(HostAddress ad
9495 . Select ( viewer => new ViewerRepositoriesModel
9596 {
9697 Owner = viewer . Login ,
97- Repositories = viewer . Repositories ( null , null , null , null , null , null , null , order , affiliation , null )
98+ Repositories = viewer . Repositories ( null , null , null , null , affiliation , null , null , order , affiliation , null )
9899 . AllPages ( )
99100 . Select ( repositorySelection ) . ToList ( ) ,
101+ ContributedToRepositories = viewer . RepositoriesContributedTo ( 100 , null , null , null , null , null , null , order , null )
102+ . Nodes
103+ . Select ( repositorySelection ) . ToList ( ) ,
100104 Organizations = viewer . Organizations ( null , null , null , null ) . AllPages ( ) . Select ( org => new
101105 {
102106 org . Login ,
103- Repositories = org . Repositories ( null , null , null , null , null , null , null , order , null , null )
104- . AllPages ( )
107+ Repositories = org . Repositories ( 100 , null , null , null , null , null , null , order , null , null )
108+ . Nodes
105109 . Select ( repositorySelection ) . ToList ( )
106110 } ) . ToDictionary ( x => x . Login , x => ( IReadOnlyList < RepositoryListItemModel > ) x . Repositories ) ,
107111 } ) . Compile ( ) ;
0 commit comments