This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed
Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -149,11 +149,8 @@ public async Task<Page<PullRequestListItemModel>> ReadPullRequests(
149149 item . CommentCount += item . Reviews . Sum ( x => x . Count ) ;
150150 item . Reviews = null ;
151151
152- var hasCheckSuites = item . LastCommit . CheckSuites != null
153- && item . LastCommit . CheckSuites . Any ( ) ;
154-
155- var hasStatuses = item . LastCommit . Statuses != null
156- && item . LastCommit . Statuses . Any ( ) ;
152+ var hasCheckSuites = item . LastCommit ? . CheckSuites . Any ( ) ?? false ;
153+ var hasStatuses = item . LastCommit ? . Statuses . Any ( ) ?? false ;
157154
158155 if ( ! hasCheckSuites && ! hasStatuses )
159156 {
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ public static IEnumerable<IPullRequestCheckViewModel> Build(IViewViewModelFactor
103103 return pullRequestCheckViewModel ;
104104 } ) ?? new PullRequestCheckViewModel [ 0 ] ;
105105
106- return statuses . Union ( checks ) . OrderBy ( model => model . Title ) ;
106+ return statuses . Concat ( checks ) . OrderBy ( model => model . Title ) ;
107107 }
108108
109109 [ ImportingConstructor ]
Original file line number Diff line number Diff line change @@ -95,11 +95,11 @@ public class PullRequestDetailModel
9595 /// <summary>
9696 /// Gets or sets a collection of pull request Checks Suites
9797 /// </summary>
98- public List < CheckSuiteModel > CheckSuites { get ; set ; }
98+ public IReadOnlyList < CheckSuiteModel > CheckSuites { get ; set ; }
9999
100100 /// <summary>
101101 /// Gets or sets a collection of pull request Statuses
102102 /// </summary>
103- public List < StatusModel > Statuses { get ; set ; }
103+ public IReadOnlyList < StatusModel > Statuses { get ; set ; }
104104 }
105105}
You can’t perform that action at this time.
0 commit comments