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

Commit c06767e

Browse files
Merge branch 'features/check-suite-annotations-inline' into donokuda/check-suite-polish
2 parents 56dd609 + 2030133 commit c06767e

File tree

14 files changed

+29
-42
lines changed

14 files changed

+29
-42
lines changed
-194 KB
Binary file not shown.
-202 KB
Binary file not shown.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void Load(PullRequestDetailModel pullRequest)
122122
var checkSuiteRun = pullRequest
123123
.CheckSuites.SelectMany(checkSuite => checkSuite.CheckRuns
124124
.Select(checkRun => new{checkSuite, checkRun}))
125-
.First(arg => arg.checkRun.CheckRunId == CheckRunId);
125+
.First(arg => arg.checkRun.Id == CheckRunId);
126126

127127
CheckSuiteName = checkSuiteRun.checkSuite.ApplicationName;
128128
CheckRunName = checkSuiteRun.checkRun.Name;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static IEnumerable<IPullRequestCheckViewModel> Build(IViewViewModelFactor
100100

101101
var pullRequestCheckViewModel = (PullRequestCheckViewModel)viewViewModelFactory.CreateViewModel<IPullRequestCheckViewModel>();
102102
pullRequestCheckViewModel.CheckType = PullRequestCheckType.ChecksApi;
103-
pullRequestCheckViewModel.CheckRunId = arg.checkRun.CheckRunId;
103+
pullRequestCheckViewModel.CheckRunId = arg.checkRun.Id;
104104
pullRequestCheckViewModel.HasAnnotations = arg.checkRun.Annotations?.Any() ?? false;
105105
pullRequestCheckViewModel.Title = arg.checkRun.Name;
106106
pullRequestCheckViewModel.Description = arg.checkRun.Summary;

src/GitHub.Exports/Models/CheckRunModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ public class CheckRunModel
4646
/// <summary>
4747
/// The database id of a Check Run.
4848
/// </summary>
49-
public string CheckRunId { get; set; }
49+
public string Id { get; set; }
5050
}
5151
}

src/GitHub.InlineReviews/Services/PullRequestSessionService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ async Task<LastCommitAdapter> GetPullRequestLastCommitAdapter(HostAddress addres
792792
CheckRuns = suite.CheckRuns(null, null, null, null, null).AllPages(10)
793793
.Select(run => new CheckRunModel
794794
{
795-
CheckRunId = run.Id.Value,
795+
Id = run.Id.Value,
796796
Conclusion = run.Conclusion.FromGraphQl(),
797797
Status = run.Status.FromGraphQl(),
798798
Name = run.Name,

src/GitHub.TeamFoundation.14/GitHub.TeamFoundation.14.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
105105
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Immutable.14.0.14.3.25407\lib\net45\Microsoft.VisualStudio.Shell.Immutable.14.0.dll</HintPath>
106106
<Private>True</Private>
107-
<Aliases>global</Aliases>
108107
</Reference>
109108
<Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
110109
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll</HintPath>

src/GitHub.TeamFoundation.14/Services/VSGitExt.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,24 @@
1515

1616
namespace GitHub.VisualStudio.Base
1717
{
18+
// This is a workaround to avoid using reference aliases, which don't currently work with <PackageReference>.
19+
#if TEAMEXPLORER14
20+
public class VSGitExt14 : VSGitExt
21+
{
22+
public VSGitExt14(IServiceProvider serviceProvider, IGitService gitService) : base(serviceProvider, gitService) { }
23+
}
24+
#elif TEAMEXPLORER15
25+
public class VSGitExt15 : VSGitExt
26+
{
27+
public VSGitExt15(IServiceProvider serviceProvider, IGitService gitService) : base(serviceProvider, gitService) { }
28+
}
29+
#elif TEAMEXPLORER16
30+
public class VSGitExt16 : VSGitExt
31+
{
32+
public VSGitExt16(IServiceProvider serviceProvider, IGitService gitService) : base(serviceProvider, gitService) { }
33+
}
34+
#endif
35+
1836
/// <summary>
1937
/// This service acts as an always available version of <see cref="IGitExt"/>.
2038
/// </summary>

src/GitHub.TeamFoundation.14/Services/VSGitServices.cs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
#if TEAMEXPLORER15
2-
// Microsoft.VisualStudio.Shell.Framework has an alias to avoid conflict with IAsyncServiceProvider
3-
extern alias SF15;
4-
using ServiceProgressData = SF15::Microsoft.VisualStudio.Shell.ServiceProgressData;
5-
#endif
6-
7-
using System;
8-
using System.Threading;
1+
using System;
92
using System.Collections.Generic;
103
using System.Diagnostics.CodeAnalysis;
114
using System.ComponentModel.Composition;
@@ -90,22 +83,14 @@ public async Task Clone(
9083
await StartClonenOnConnectPageAsync(teamExplorer, cloneUrl, clonePath, recurseSubmodules);
9184
NavigateToHomePage(teamExplorer); // Show progress on Team Explorer - Home
9285
await WaitForCloneOnHomePageAsync(teamExplorer);
93-
#elif TEAMEXPLORER15
94-
var gitExt = serviceProvider.GetService<IGitActionsExt>();
95-
var typedProgress = ((Progress<ServiceProgressData>)progress) ?? new Progress<ServiceProgressData>();
96-
typedProgress.ProgressChanged += (s, e) => statusBar.Value.ShowMessage(e.ProgressText);
97-
var cloneTask = gitExt.CloneAsync(cloneUrl, clonePath, recurseSubmodules, default(CancellationToken), typedProgress);
98-
99-
NavigateToHomePage(teamExplorer); // Show progress on Team Explorer - Home
100-
await cloneTask;
101-
#elif TEAMEXPLORER16
86+
#elif TEAMEXPLORER15 || TEAMEXPLORER16
10287
// The ServiceProgressData type is in a Visual Studio 2019 assembly that we don't currently have access to.
10388
// Using reflection to call the CloneAsync in order to avoid conflicts with the Visual Studio 2017 version.
10489
// Progress won't be displayed on the status bar, but it appears prominently on the Team Explorer Home view.
10590
var gitExt = serviceProvider.GetService<IGitActionsExt>();
10691
var cloneAsyncMethod = typeof(IGitActionsExt).GetMethod(nameof(IGitActionsExt.CloneAsync));
10792
Assumes.NotNull(cloneAsyncMethod);
108-
var cloneParameters = new object[] { cloneUrl, clonePath, recurseSubmodules, default(CancellationToken), null };
93+
var cloneParameters = new object[] { cloneUrl, clonePath, recurseSubmodules, null, null };
10994
var cloneTask = (Task)cloneAsyncMethod.Invoke(gitExt, cloneParameters);
11095

11196
NavigateToHomePage(teamExplorer); // Show progress on Team Explorer - Home

src/GitHub.TeamFoundation.15/GitHub.TeamFoundation.15.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
<Reference Include="Microsoft.VisualStudio.Shell.Framework, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
9696
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Framework.15.4.27004\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll</HintPath>
9797
<Private>True</Private>
98-
<Aliases>SF15</Aliases>
9998
</Reference>
10099
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.11.0, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
101100
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll</HintPath>
@@ -104,7 +103,6 @@
104103
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
105104
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Immutable.14.0.14.3.25407\lib\net45\Microsoft.VisualStudio.Shell.Immutable.14.0.dll</HintPath>
106105
<Private>True</Private>
107-
<Aliases>global</Aliases>
108106
</Reference>
109107
<Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
110108
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll</HintPath>

0 commit comments

Comments
 (0)