This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Functionality to support Check Suites API#1798
Merged
StanleyGoldman merged 28 commits intomasterfrom Aug 21, 2018
Merged
Conversation
This reverts commit b086078.
# Conflicts: # src/GitHub.App/Services/PullRequestService.cs # src/GitHub.App/ViewModels/GitHubPane/PullRequestDetailViewModel.cs # src/GitHub.Exports/Models/PullRequestDetailModel.cs # src/GitHub.InlineReviews/Services/PullRequestSessionService.cs # test/GitHub.App.UnitTests/ViewModels/GitHubPane/PullRequestDetailViewModelTests.cs
33be14b to
fc1e2ea
Compare
fc1e2ea to
b16b5ea
Compare
grokys
suggested changes
Aug 14, 2018
Contributor
grokys
left a comment
There was a problem hiding this comment.
Looks good so far! A few nits, and one requested change that I couldn't add as an inline comment:
- Could the nupkg be removed from the
libdirectory now? That package is on nuget.org right?
| item.Reviews = null; | ||
|
|
||
| var hasStatuses = item.LastCommit.Statuses != null | ||
| var hasCheckSuites = item.LastCommit.CheckSuites != null |
Contributor
There was a problem hiding this comment.
Nit: could these be written more simply?
var hasCheckSuites = item.LastCommit.CheckSuites?.Any() ?? false;
| return pullRequestCheckViewModel; | ||
| }) ?? new PullRequestCheckViewModel[0]; | ||
|
|
||
| return statuses.Union(checks).OrderBy(model => model.Title); |
Contributor
There was a problem hiding this comment.
Is .Union the best operator to use here? It will do equality checks for each item, even though the items will never be equal. Not a big deal but I would have said that .Concat would be a better choice here.
Contributor
Author
There was a problem hiding this comment.
Oh. I never knew that...
| /// <summary> | ||
| /// Model for a single check annotation. | ||
| /// </summary> | ||
| public class CheckRunAnnotationModel |
| /// Gets or sets a collection of pull request Checks & Statuses | ||
| /// Gets or sets a collection of pull request Checks Suites | ||
| /// </summary> | ||
| public List<CheckSuiteModel> CheckSuites { get; set; } |
Contributor
There was a problem hiding this comment.
IReadOnlyList is used for the lists elsewhere in this model (and oops I didn't notice this with Statuses).
grokys
approved these changes
Aug 21, 2018
Contributor
|
This LGTM! Thanks for your work on this @StanleyGoldman ✨ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request displays a summary line for Check Runs and links a user to the Check Run page.