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

Commit 2c113e3

Browse files
Merge branch 'master' into features/check-suite-annotations-inline-markers
2 parents 9097dba + eb2fb81 commit 2c113e3

File tree

58 files changed

+1344
-1608
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1344
-1608
lines changed

GitHubVS.sln

Lines changed: 21 additions & 81 deletions
Large diffs are not rendered by default.

azure-pipelines.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# .NET Desktop
2+
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
3+
# Add steps that publish symbols, save build artifacts, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
5+
6+
pool:
7+
vmImage: 'VS2017-Win2016'
8+
9+
variables:
10+
solution: '**/*.sln'
11+
buildPlatform: 'Any CPU'
12+
buildConfiguration: 'Release'
13+
14+
steps:
15+
- task: InstallSSHKey@0
16+
inputs:
17+
hostName: github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
18+
sshPublicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCx/AxLjr4mhH7XFlbISb65GBxQnVnKh1owmAT1bK/Qt1b4/Z0SL68IvV88DpgLyKbica2giEVfKo/Z4dkO+P8M2bGXrNgazzfO910DlR+e1vt8BSU/Dbvscz0i1lsfKb3PnfSouCkQev6Th0v+hBdgkuackWgaBw22DDLkp9Uf/cAo+QYLz56p5KVctEESRRgGgIIlZyUc8OYDMSU2wQhG9x31mSyJ4ODuOZsi1RgBBHrgUb2QRhLJ9nZWfQgGBRDxGYTKLWiWIQwgSVQ9x1Az/Rei+CbPRvLcVGg+5vHt8lcu+HxEgrY4IsjXdMqosPqxQ+TT6f+G4GQDn8+IQ4wOpTVi84PkOQX3JPE2QSJwWA0AHNe5NTSns6WWYQyzxFJYBN2pLPuMnj9/+ozV3GaeQqn47WHfUH3s5IawNQPTFDxcl4qsmU66Ybfqa4eFIPEvCCp1leQcuXyDHxKLq80x1szN4kn0oyL2W0zbkwTaZG4I5l4Rto0hErUf3qx7FlZjMGEFMdJVskgnRMkKdqngF0FmSYQICpmqqYD8TydUc6jxZVOCvFF5gbqwxV/F2lk10D7FnetUNeWvpcZKbFUX4e5Ff15vibJZp4/5FUbksv+glfbPwk6tGuNj3xPFODP7KG8Y5wtcbknX11XI0vi+iL8TxL0Vk30TpZUMXWYYvQ==
19+
sshKeySecureFile: id_rsa
20+
21+
- script: git submodule init && git submodule deinit script && git submodule update
22+
displayName: Submodule init
23+
24+
# Can't use the NuGet tasks because of https://github.com/Microsoft/azure-pipelines-tasks/issues/6790
25+
#- task: NuGetToolInstaller@0
26+
#- task: NuGetCommand@2
27+
# inputs:
28+
# restoreSolution: '$(solution)'
29+
# feedsToUse: 'config'
30+
# nugetConfigPath: nuget.config
31+
32+
# Instead run nuget manually.
33+
- script: tools\nuget\nuget.exe restore
34+
displayName: NuGet restore
35+
36+
# Ideally we'd run NerdBank.GitVersioning but that will come later. For now bump the
37+
# version with the azure BuildId
38+
- task: PowerShell@2
39+
inputs:
40+
targetType: filePath
41+
filePath: '$(Build.SourcesDirectory)\scripts\Bump-Version.ps1'
42+
arguments: -BumpBuild -BuildNumber:$(Build.BuildId)
43+
displayName: Bump version
44+
45+
- task: VSBuild@1
46+
inputs:
47+
solution: GitHubVS.sln
48+
platform: '$(buildPlatform)'
49+
configuration: '$(buildConfiguration)'
50+
51+
# VSTest is hanging. Skip tests for now; we're still running Appveyor which will handle the tests.
52+
#- task: VSTest@2
53+
# inputs:
54+
# searchFolder: '$(Build.SourcesDirectory)\test'
55+
# testAssemblyVer2: '**\bin\**\*Tests.dll'
56+
# platform: '$(buildPlatform)'
57+
# configuration: '$(buildConfiguration)'
58+
# diagnosticsEnabled: true
59+
# runSettingsFile: '$(Build.SourcesDirectory)\test\test.runsettings'
60+
61+
- task: PublishBuildArtifacts@1
62+
inputs:
63+
pathtoPublish: '$(Build.SourcesDirectory)\build\Release\GitHub.VisualStudio.vsix'
64+
artifactName: 'vsix'

nuget.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
4+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
55
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
66
<add key="vsixtesting" value="https://www.myget.org/F/vsixtesting/api/v3/index.json" />
77
<add key="Custom Packages for GHfVS" value="lib" />

script

src/GitHub.App/GitHub.App.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,10 @@
4040
</ItemGroup>
4141

4242
<ItemGroup>
43-
<PackageReference Include="EnvDTE" Version="8.0.1" />
4443
<PackageReference Include="LibGit2Sharp" Version="0.23.1" />
4544
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="1.0.164" />
45+
<PackageReference Include="Madskristensen.VisualStudio.SDK" Version="14.3.75-pre" />
4646
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.1" />
47-
<PackageReference Include="Microsoft.VisualStudio.ComponentModelHost" Version="14.0.25424" />
48-
<PackageReference Include="Microsoft.VisualStudio.Editor" Version="14.3.25407" />
49-
<PackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.17" />
50-
<PackageReference Include="Microsoft.VisualStudio.Shell.14.0" Version="14.3.25407" />
5147
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
5248
<PackageReference Include="Octokit.GraphQL" Version="0.1.2-beta" />
5349
<PackageReference Include="Rothko" Version="0.0.3-ghfvs" />

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

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public sealed class GitHubPaneViewModel : ViewModelBase, IGitHubPaneViewModel, I
4545
readonly ILoggedOutViewModel loggedOut;
4646
readonly INotAGitHubRepositoryViewModel notAGitHubRepository;
4747
readonly INotAGitRepositoryViewModel notAGitRepository;
48+
readonly INoRemoteOriginViewModel noRemoteOrigin;
4849
readonly ILoginFailedViewModel loginFailed;
4950
readonly SemaphoreSlim navigating = new SemaphoreSlim(1);
5051
readonly ObservableAsPropertyHelper<ContentOverride> contentOverride;
@@ -72,6 +73,7 @@ public GitHubPaneViewModel(
7273
ILoggedOutViewModel loggedOut,
7374
INotAGitHubRepositoryViewModel notAGitHubRepository,
7475
INotAGitRepositoryViewModel notAGitRepository,
76+
INoRemoteOriginViewModel noRemoteOrigin,
7577
ILoginFailedViewModel loginFailed)
7678
{
7779
Guard.ArgumentNotNull(viewModelFactory, nameof(viewModelFactory));
@@ -84,6 +86,7 @@ public GitHubPaneViewModel(
8486
Guard.ArgumentNotNull(loggedOut, nameof(loggedOut));
8587
Guard.ArgumentNotNull(notAGitHubRepository, nameof(notAGitHubRepository));
8688
Guard.ArgumentNotNull(notAGitRepository, nameof(notAGitRepository));
89+
Guard.ArgumentNotNull(noRemoteOrigin, nameof(noRemoteOrigin));
8790
Guard.ArgumentNotNull(loginFailed, nameof(loginFailed));
8891

8992
this.viewModelFactory = viewModelFactory;
@@ -94,6 +97,7 @@ public GitHubPaneViewModel(
9497
this.loggedOut = loggedOut;
9598
this.notAGitHubRepository = notAGitHubRepository;
9699
this.notAGitRepository = notAGitRepository;
100+
this.noRemoteOrigin = noRemoteOrigin;
97101
this.loginFailed = loginFailed;
98102

99103
var contentAndNavigatorContent = Observable.CombineLatest(
@@ -433,8 +437,17 @@ async Task UpdateContent(LocalRepositoryModel repository)
433437
}
434438
else if (string.IsNullOrWhiteSpace(repository.CloneUrl))
435439
{
436-
log.Debug("Not a GitHub repository: {CloneUrl}", repository?.CloneUrl);
437-
Content = notAGitHubRepository;
440+
if (repository.HasRemotesButNoOrigin)
441+
{
442+
log.Debug("No origin remote");
443+
Content = noRemoteOrigin;
444+
}
445+
else
446+
{
447+
log.Debug("Not a GitHub repository: {CloneUrl}", repository?.CloneUrl);
448+
Content = notAGitHubRepository;
449+
}
450+
438451
return;
439452
}
440453

@@ -490,7 +503,7 @@ async Task UpdateContent(LocalRepositoryModel repository)
490503
Content = loggedOut;
491504
}
492505
}
493-
506+
494507
if (notGitHubRepo)
495508
{
496509
log.Debug("Not a GitHub repository: {CloneUrl}", repository?.CloneUrl);
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Reactive;
3+
using System.Threading.Tasks;
4+
using System.ComponentModel.Composition;
5+
using GitHub.Services;
6+
using ReactiveUI;
7+
8+
namespace GitHub.ViewModels.GitHubPane
9+
{
10+
/// <summary>
11+
/// The view model for the "No Origin Remote" view in the GitHub pane.
12+
/// </summary>
13+
[Export(typeof(INoRemoteOriginViewModel))]
14+
[PartCreationPolicy(CreationPolicy.NonShared)]
15+
public class NoRemoteOriginViewModel : PanePageViewModelBase, INoRemoteOriginViewModel
16+
{
17+
ITeamExplorerServices teamExplorerServices;
18+
19+
[ImportingConstructor]
20+
public NoRemoteOriginViewModel(ITeamExplorerServices teamExplorerServices)
21+
{
22+
this.teamExplorerServices = teamExplorerServices;
23+
EditRemotes = ReactiveCommand.CreateFromTask(teamExplorerServices.ShowRepositorySettingsRemotesAsync);
24+
}
25+
26+
public ReactiveCommand<Unit, Unit> EditRemotes { get; }
27+
}
28+
}

src/GitHub.Exports.Reactive/GitHub.Exports.Reactive.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@
2727

2828
<ItemGroup>
2929
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.1" />
30-
<PackageReference Include="Microsoft.VisualStudio.Language.Intellisense" Version="14.3.25407" />
3130
</ItemGroup>
3231
</Project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Reactive;
2+
using ReactiveUI;
3+
4+
namespace GitHub.ViewModels.GitHubPane
5+
{
6+
/// <summary>
7+
/// Defines the view model for the "No Origin Remote" view in the GitHub pane.
8+
/// </summary>
9+
public interface INoRemoteOriginViewModel : IPanePageViewModel
10+
{
11+
/// <summary>
12+
/// Gets a command that will allow the user to rename remotes.
13+
/// </summary>
14+
ReactiveCommand<Unit, Unit> EditRemotes { get; }
15+
}
16+
}

src/GitHub.Exports/GitHub.Exports.csproj

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,11 @@
2323
</ItemGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="EnvDTE" Version="8.0.1" />
27-
<PackageReference Include="EnvDTE80" Version="8.0.1" />
2826
<PackageReference Include="LibGit2Sharp" Version="0.23.1" />
2927
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="1.0.164" />
28+
<PackageReference Include="Madskristensen.VisualStudio.SDK" Version="14.3.75-pre" />
3029
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.1" />
31-
<PackageReference Include="Microsoft.VisualStudio.ComponentModelHost" Version="14.0.25424" />
32-
<PackageReference Include="Microsoft.VisualStudio.Editor" Version="14.3.25407" />
33-
<PackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.17" />
3430
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="1.15.103" />
35-
<PackageReference Include="Microsoft.VisualStudio.Shell.14.0" Version="14.3.25407" />
36-
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop.11.0" Version="11.0.61030" />
37-
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop.12.0" Version="12.0.30110" />
3831
<PackageReference Include="Rothko" Version="0.0.3-ghfvs" />
3932
<PackageReference Include="Serilog" Version="2.5.0" />
4033
<PackageReference Include="SerilogAnalyzer" Version="0.12.0.0" />

0 commit comments

Comments
 (0)