@@ -306,6 +306,7 @@ public virtual Task<PullRequestDetailModel> ReadPullRequestDetail(HostAddress ad
306
306
async Task < PullRequestDetailModel > ReadPullRequestDetailWithResolved ( HostAddress address , string owner ,
307
307
string name , int number , bool refresh )
308
308
{
309
+ var itemTypes = new [ ] { PullRequestTimelineItemsItemType . IssueComment , PullRequestTimelineItemsItemType . PullRequestCommit } ;
309
310
310
311
if ( readPullRequestWithResolved == null )
311
312
{
@@ -384,22 +385,22 @@ async Task<PullRequestDetailModel> ReadPullRequestDetailWithResolved(HostAddress
384
385
AvatarUrl = review . Author . AvatarUrl ( null )
385
386
}
386
387
} ) . ToList ( ) ,
387
- Timeline = pr . Timeline ( null , null , null , null , null ) . AllPages ( ) . Select ( item => item . Switch < object > ( when =>
388
- when . Commit ( commit => new CommitModel
388
+ Timeline = pr . TimelineItems ( null , null , null , null , itemTypes , null , null ) . AllPages ( ) . Select ( item => item . Switch < object > ( when =>
389
+ when . PullRequestCommit ( commit => new CommitModel
389
390
{
390
- AbbreviatedOid = commit . AbbreviatedOid ,
391
+ AbbreviatedOid = commit . Commit . AbbreviatedOid ,
391
392
Author = new CommitActorModel
392
393
{
393
- Name = commit . Author . Name ,
394
- Email = commit . Author . Email ,
395
- User = commit . Author . User != null ? new ActorModel
394
+ Name = commit . Commit . Author . Name ,
395
+ Email = commit . Commit . Author . Email ,
396
+ User = commit . Commit . Author . User != null ? new ActorModel
396
397
{
397
- Login = commit . Author . User . Login ,
398
- AvatarUrl = commit . Author . User . AvatarUrl ( null ) ,
398
+ Login = commit . Commit . Author . User . Login ,
399
+ AvatarUrl = commit . Commit . Author . User . AvatarUrl ( null ) ,
399
400
} : null
400
401
} ,
401
- MessageHeadline = commit . MessageHeadline ,
402
- Oid = commit . Oid ,
402
+ MessageHeadline = commit . Commit . MessageHeadline ,
403
+ Oid = commit . Commit . Oid ,
403
404
} ) . IssueComment ( comment => new CommentModel
404
405
{
405
406
Author = new ActorModel
@@ -491,6 +492,8 @@ async Task<PullRequestDetailModel> ReadPullRequestDetailWithResolved(HostAddress
491
492
async Task < PullRequestDetailModel > ReadPullRequestDetailWithoutResolved ( HostAddress address , string owner ,
492
493
string name , int number , bool refresh )
493
494
{
495
+ var itemTypes = new [ ] { PullRequestTimelineItemsItemType . IssueComment , PullRequestTimelineItemsItemType . PullRequestCommit } ;
496
+
494
497
if ( readPullRequestWithoutResolved == null )
495
498
{
496
499
readPullRequestWithoutResolved = new Query ( )
@@ -563,21 +566,21 @@ async Task<PullRequestDetailModel> ReadPullRequestDetailWithoutResolved(HostAddr
563
566
Url = comment . Url ,
564
567
} ) . ToList ( ) ,
565
568
} ) . ToList ( ) ,
566
- Timeline = pr . Timeline ( null , null , null , null , null ) . AllPages ( ) . Select ( item => item . Switch < object > ( when =>
567
- when . Commit ( commit => new CommitModel
569
+ Timeline = pr . TimelineItems ( null , null , null , null , itemTypes , null , null ) . AllPages ( ) . Select ( item => item . Switch < object > ( when =>
570
+ when . PullRequestCommit ( commit => new CommitModel
568
571
{
569
- AbbreviatedOid = commit . AbbreviatedOid ,
572
+ AbbreviatedOid = commit . Commit . AbbreviatedOid ,
570
573
Author = new CommitActorModel {
571
- Name = commit . Author . Name ,
572
- Email = commit . Author . Email ,
573
- User = commit . Author . User != null ? new ActorModel
574
+ Name = commit . Commit . Author . Name ,
575
+ Email = commit . Commit . Author . Email ,
576
+ User = commit . Commit . Author . User != null ? new ActorModel
574
577
{
575
- Login = commit . Author . User . Login ,
576
- AvatarUrl = commit . Author . User . AvatarUrl ( null ) ,
578
+ Login = commit . Commit . Author . User . Login ,
579
+ AvatarUrl = commit . Commit . Author . User . AvatarUrl ( null ) ,
577
580
} : null
578
581
} ,
579
- MessageHeadline = commit . MessageHeadline ,
580
- Oid = commit . Oid ,
582
+ MessageHeadline = commit . Commit . MessageHeadline ,
583
+ Oid = commit . Commit . Oid ,
581
584
} ) . IssueComment ( comment => new CommentModel
582
585
{
583
586
Author = new ActorModel
0 commit comments