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

Commit 1304b27

Browse files
committed
Merge build/sign-with-sha256 into release/1.0.16.3
2 parents 6a0da22 + 2c8f5a6 commit 1304b27

File tree

7 files changed

+26
-11
lines changed

7 files changed

+26
-11
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Most of the extension UI lives in the Team Explorer pane, which is available fro
55

66
Official builds of this extension are available at [the official website](https://visualstudio.github.com).
77

8+
Older and pre-release/beta/untested versions are available at [the releases page](https://github.com/github/VisualStudio/releases), and also via a custom gallery feed for Visual Studio.
9+
10+
You can configure the gallery by going to `Tools / Options / Extensions and Updates` and adding a new gallery with the url https://visualstudio.github.com/releases/feed.rss. The gallery will now be available from `Tools / Extensions and Updates`.
11+
812
[![Join the chat at https://gitter.im/github/VisualStudio](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/github/VisualStudio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
913

1014
## Build requirements

deploy-local.cmd

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
powershell.exe .\script\deploy.ps1 production None -Force -NoChat -NoPush -NoUpload

script

src/GitHub.App/Controllers/UIController.cs

+7-3
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,15 @@ public void Start([AllowNull] IConnection connection)
256256
else
257257
{
258258
connectionManager
259-
.IsLoggedIn(hosts)
260-
.Do(loggedin =>
259+
.GetLoggedInConnections(hosts)
260+
.FirstOrDefaultAsync()
261+
.Select(c =>
261262
{
263+
bool loggedin = c != null;
262264
if (currentFlow != UIControllerFlow.Authentication)
263265
{
264266
if (loggedin) // register the first available connection so the viewmodel can use it
265-
uiProvider.AddService(connectionManager.Connections.First(c => hosts.LookupHost(c.HostAddress).IsLoggedIn));
267+
uiProvider.AddService(c);
266268
else
267269
{
268270
// a connection will be added to the list when auth is done, register it so the next
@@ -284,6 +286,8 @@ public void Start([AllowNull] IConnection connection)
284286
.PermitIf(Trigger.Clone, UIViewType.Login, () => !loggedin)
285287
.PermitIf(Trigger.Publish, UIViewType.Publish, () => loggedin)
286288
.PermitIf(Trigger.Publish, UIViewType.Login, () => !loggedin);
289+
290+
return loggedin;
287291
})
288292
.ObserveOn(RxApp.MainThreadScheduler)
289293
.Subscribe(_ => { }, () =>

src/GitHub.Exports.Reactive/Extensions/ConnectionManagerExtensions.cs

+9-4
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,22 @@ public static IObservable<bool> IsLoggedIn(this IConnectionManager cm, IReposito
1212
{
1313
return cm.Connections.ToObservable()
1414
.SelectMany(c => c.Login())
15-
.Select(c => hosts.LookupHost(c.HostAddress))
16-
.Any(h => h.IsLoggedIn);
15+
.Any(c => hosts.LookupHost(c.HostAddress).IsLoggedIn);
1716
}
1817

1918
public static IObservable<bool> IsLoggedIn(this IConnectionManager cm, IRepositoryHosts hosts, HostAddress address)
2019
{
2120
return cm.Connections.ToObservable()
2221
.Where(c => c.HostAddress.Equals(address))
2322
.SelectMany(c => c.Login())
24-
.Select(c => hosts.LookupHost(c.HostAddress))
25-
.Any(h => h.IsLoggedIn);
23+
.Any(c => hosts.LookupHost(c.HostAddress).IsLoggedIn);
24+
}
25+
26+
public static IObservable<IConnection> GetLoggedInConnections(this IConnectionManager cm, IRepositoryHosts hosts)
27+
{
28+
return cm.Connections.ToObservable()
29+
.SelectMany(c => c.Login())
30+
.Where(c => hosts.LookupHost(c.HostAddress).IsLoggedIn);
2631
}
2732
}
2833
}

src/GitHub.VisualStudio/TeamExplorer/Connect/GitHubConnectSection.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,11 @@ void StartFlow(UIControllerFlow controllerFlow)
324324
var uiProvider = ServiceProvider.GetExportedValue<IUIProvider>();
325325
uiProvider.GitServiceProvider = ServiceProvider;
326326
var ret = uiProvider.SetupUI(controllerFlow, SectionConnection);
327-
ret.Subscribe(c =>
327+
ret.Subscribe(_ => {}, () =>
328328
{
329-
if (c.IsViewType(UIViewType.Clone))
329+
if (controllerFlow == UIControllerFlow.Clone)
330330
isCloning = true;
331-
else if (c.IsViewType(UIViewType.Create))
331+
else if (controllerFlow == UIControllerFlow.Create)
332332
isCreating = true;
333333
});
334334
uiProvider.RunUI();

src/GitHub.VisualStudio/packages.config

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<packages>
33
<package id="EditorUtils2013" version="1.4.1.1" targetFramework="net45" />
44
<package id="Fody" version="1.28.0" targetFramework="net45" developmentDependency="true" />
5+
<package id="Microsoft.VSSDK.Vsixsigntool" version="14.1.24720" targetFramework="net45" />
56
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
67
<package id="NLog" version="3.1.0" targetFramework="net45" />
78
<package id="NullGuard.Fody" version="1.4.1" targetFramework="net45" developmentDependency="true" />

0 commit comments

Comments
 (0)