Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 041ea59

Browse files
Lots of changes needed after merge
1 parent aac507c commit 041ea59

File tree

14 files changed

+35
-230
lines changed

14 files changed

+35
-230
lines changed

src/GitHub.Api/GitHub.Api.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
3333
<PackageReference Include="Octokit.GraphQL" Version="0.1.2-beta" />
3434
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
35-
<PackageReference Include="Octokit.GraphQL" Version="0.1.1-beta" />
35+
<PackageReference Include="Octokit.GraphQL" Version="0.1.2-beta" />
3636
</ItemGroup>
3737
</Project>

src/GitHub.App/GitHub.App.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
5252
<PackageReference Include="Octokit.GraphQL" Version="0.1.2-beta" />
5353
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
54-
<PackageReference Include="Octokit.GraphQL" Version="0.1.1-beta" />
54+
<PackageReference Include="Octokit.GraphQL" Version="0.1.2-beta" />
5555
<PackageReference Include="Rothko" Version="0.0.3-ghfvs" />
5656
<PackageReference Include="Serilog" Version="2.5.0" />
5757
<PackageReference Include="SerilogAnalyzer" Version="0.12.0.0" />

src/GitHub.App/SampleData/PullRequestAnnotationsViewModelDesigner.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
using System.Collections.Generic;
22
using System.Diagnostics.CodeAnalysis;
3+
using System.Reactive;
34
using System.Threading.Tasks;
45
using GitHub.App.ViewModels.GitHubPane;
56
using GitHub.Models;
67
using GitHub.ViewModels.GitHubPane;
78
using ReactiveUI;
9+
using ReactiveUI.Legacy;
810

911
namespace GitHub.SampleData
1012
{
@@ -15,7 +17,7 @@ public sealed class PullRequestAnnotationsViewModelDesigner : PanePageViewModelB
1517
public string RemoteRepositoryOwner { get; set; }
1618
public int PullRequestNumber { get; set; } = 123;
1719
public int CheckRunId { get; set; }
18-
public ReactiveCommand<object> NavigateToPullRequest { get; }
20+
public ReactiveCommand<Unit, Unit> NavigateToPullRequest { get; }
1921
public string PullRequestTitle { get; } = "Fixing stuff in this PR";
2022
public string CheckSuiteName { get; } = "Awesome Check Suite";
2123
public string CheckRunName { get; } = "Psuedo Check Run";

src/GitHub.App/SampleData/PullRequestDetailViewModelDesigner.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Reactive;
1010
using System.Threading.Tasks;
1111
using GitHub.SampleData;
12+
using ReactiveUI.Legacy;
1213

1314
namespace GitHub.SampleData
1415
{
@@ -122,10 +123,10 @@ public PullRequestDetailViewModelDesigner()
122123
public ReactiveCommand<Unit, Unit> Checkout { get; }
123124
public ReactiveCommand<Unit, Unit> Pull { get; }
124125
public ReactiveCommand<Unit, Unit> Push { get; }
125-
public ReactiveCommand<Unit> SyncSubmodules { get; }
126+
public ReactiveCommand<Unit, Unit> SyncSubmodules { get; }
126127
public ReactiveCommand<Unit, Unit> OpenOnGitHub { get; }
127128
public ReactiveCommand<IPullRequestReviewSummaryViewModel, Unit> ShowReview { get; }
128-
public ReactiveCommand<object> ShowAnnotations { get; }
129+
public ReactiveCommand<IPullRequestCheckViewModel, Unit> ShowAnnotations { get; }
129130

130131
public IReadOnlyList<IPullRequestCheckViewModel> Checks { get; }
131132

src/GitHub.App/ViewModels/GitHubPane/PullRequestAnnotationsViewModel.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
using System.Collections.Generic;
33
using System.ComponentModel.Composition;
44
using System.Linq;
5+
using System.Reactive;
56
using System.Threading.Tasks;
67
using GitHub.Models;
78
using GitHub.Services;
89
using GitHub.ViewModels.GitHubPane;
910
using ReactiveUI;
11+
using ReactiveUI.Legacy;
12+
using ReactiveCommand = ReactiveUI.ReactiveCommand;
1013

1114
namespace GitHub.App.ViewModels.GitHubPane
1215
{
@@ -31,8 +34,10 @@ public class PullRequestAnnotationsViewModel : PanePageViewModelBase, IPullReque
3134
public PullRequestAnnotationsViewModel(IPullRequestSessionManager sessionManager)
3235
{
3336
this.sessionManager = sessionManager;
34-
NavigateToPullRequest = ReactiveCommand.Create().OnExecuteCompleted(_ =>
35-
NavigateTo(FormattableString.Invariant($"{LocalRepository.Owner}/{LocalRepository.Name}/pull/{PullRequestNumber}")));
37+
NavigateToPullRequest = ReactiveCommand.Create(() => {
38+
NavigateTo(FormattableString.Invariant(
39+
$"{LocalRepository.Owner}/{LocalRepository.Name}/pull/{PullRequestNumber}"));
40+
});
3641
}
3742

3843
/// <inheritdoc/>
@@ -74,7 +79,7 @@ public async Task InitializeAsync(ILocalRepositoryModel localRepository, IConnec
7479
public int CheckRunId { get; private set; }
7580

7681
/// <inheritdoc/>
77-
public ReactiveCommand<object> NavigateToPullRequest { get; private set; }
82+
public ReactiveCommand<Unit, Unit> NavigateToPullRequest { get; private set; }
7883

7984
/// <inheritdoc/>
8085
public string PullRequestTitle

src/GitHub.App/ViewModels/GitHubPane/PullRequestCheckViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.ComponentModel.Composition;
44
using System.Linq;
55
using System.Linq.Expressions;
6+
using System.Reactive;
67
using GitHub.Extensions;
78
using GitHub.Factories;
89
using GitHub.Models;

src/GitHub.App/ViewModels/GitHubPane/PullRequestDetailViewModel.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
using GitHub.Services;
1919
using LibGit2Sharp;
2020
using ReactiveUI;
21+
using ReactiveUI.Legacy;
2122
using Serilog;
2223
using static System.FormattableString;
24+
using ReactiveCommand = ReactiveUI.ReactiveCommand;
2325

2426
namespace GitHub.ViewModels.GitHubPane
2527
{
@@ -128,7 +130,7 @@ public PullRequestDetailViewModel(
128130

129131
ShowReview = ReactiveCommand.Create<IPullRequestReviewSummaryViewModel>(DoShowReview);
130132

131-
ShowAnnotations = ReactiveCommand.Create().OnExecuteCompleted(DoShowAnnotations);
133+
ShowAnnotations = ReactiveCommand.Create<IPullRequestCheckViewModel>(DoShowAnnotations);
132134
}
133135

134136
private void DoOpenDetailsUrl()
@@ -267,7 +269,7 @@ public Uri WebUrl
267269
public ReactiveCommand<IPullRequestReviewSummaryViewModel, Unit> ShowReview { get; }
268270

269271
/// <inheritdoc/>
270-
public ReactiveCommand<object> ShowAnnotations { get; }
272+
public ReactiveCommand<IPullRequestCheckViewModel, Unit> ShowAnnotations { get; }
271273

272274
/// <inheritdoc/>
273275
public IReadOnlyList<IPullRequestCheckViewModel> Checks
@@ -591,10 +593,8 @@ async Task DoSyncSubmodules()
591593
}
592594
}
593595

594-
void DoShowReview(IPullRequestReviewSummaryViewModel item)
596+
void DoShowReview(IPullRequestReviewSummaryViewModel review)
595597
{
596-
var review = item;
597-
598598
if (review.State == PullRequestReviewState.Pending)
599599
{
600600
NavigateTo(Invariant($"{RemoteRepositoryOwner}/{LocalRepository.Name}/pull/{Number}/review/new"));
@@ -605,9 +605,8 @@ void DoShowReview(IPullRequestReviewSummaryViewModel item)
605605
}
606606
}
607607

608-
void DoShowAnnotations(object item)
608+
void DoShowAnnotations(IPullRequestCheckViewModel checkView)
609609
{
610-
var checkView = (PullRequestCheckViewModel)item;
611610
NavigateTo(Invariant($"{RemoteRepositoryOwner}/{LocalRepository.Name}/pull/{Number}/checkruns/{checkView.CheckRunId}"));
612611
}
613612

src/GitHub.Exports.Reactive/ViewModels/GitHubPane/IPullRequestAnnotationsViewModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
using System.Collections.Generic;
2+
using System.Reactive;
23
using System.Threading.Tasks;
34
using GitHub.Models;
45
using ReactiveUI;
6+
using ReactiveUI.Legacy;
57

68
namespace GitHub.ViewModels.GitHubPane
79
{
@@ -47,7 +49,7 @@ public interface IPullRequestAnnotationsViewModel : IPanePageViewModel
4749
/// <summary>
4850
/// Gets a command which navigates to the parent pull request.
4951
/// </summary>
50-
ReactiveCommand<object> NavigateToPullRequest { get; }
52+
ReactiveCommand<Unit, Unit> NavigateToPullRequest { get; }
5153

5254
/// <summary>
5355
/// Gets the list of annotations.

src/GitHub.Exports.Reactive/ViewModels/GitHubPane/IPullRequestDetailViewModel.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using GitHub.Models;
66
using GitHub.Services;
77
using ReactiveUI;
8+
using ReactiveUI.Legacy;
89

910
namespace GitHub.ViewModels.GitHubPane
1011
{
@@ -168,7 +169,7 @@ public interface IPullRequestDetailViewModel : IPanePageViewModel, IOpenInBrowse
168169
/// <summary>
169170
/// Sync submodules for PR branch.
170171
/// </summary>
171-
ReactiveCommand<Unit> SyncSubmodules { get; }
172+
ReactiveCommand<Unit, Unit> SyncSubmodules { get; }
172173

173174
/// <summary>
174175
/// Gets a command that opens the pull request on GitHub.
@@ -183,7 +184,7 @@ public interface IPullRequestDetailViewModel : IPanePageViewModel, IOpenInBrowse
183184
/// <summary>
184185
/// Gets a command that navigates to a pull request's check run annotation list.
185186
/// </summary>
186-
ReactiveCommand<object> ShowAnnotations { get; }
187+
ReactiveCommand<IPullRequestCheckViewModel, Unit> ShowAnnotations { get; }
187188

188189
/// <summary>
189190
/// Gets the latest pull request checks & statuses.

src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:ghfvs="https://github.com/github/VisualStudio"
76
xmlns:local="clr-namespace:GitHub.InlineReviews.Views"
87
xmlns:cache="clr-namespace:GitHub.UI.Helpers;assembly=GitHub.UI"
98
xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI"
9+
xmlns:ghfvs="https://github.com/github/VisualStudio"
1010
mc:Ignorable="d"
1111
d:DesignHeight="200" d:DesignWidth="500">
1212
<UserControl.Resources>

0 commit comments

Comments
 (0)