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

Commit 85c1ae7

Browse files
committed
Merge branch 'master' into feature/pr/github-pane
2 parents 2ed22d5 + 0ea5701 commit 85c1ae7

File tree

16 files changed

+188
-44
lines changed

16 files changed

+188
-44
lines changed

documentation/manifest.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# First Launch
2+
- **If last solution was in a git repo hosted on GitHub**
3+
- **Team Explorer Home page shows:**
4+
- [ ] GitHub header, repo information
5+
- [ ] Pull Requests button
6+
- [ ] Pulse button
7+
- [ ] Graphs button
8+
- [ ] Issues button
9+
- **If last solution was in a git repo not hosted on GitHub**
10+
- [ ] Team Explorer Home page does not show any github information
11+
- **Go to Team Explorer Connect page**
12+
- [ ] GitHub invitation section in Hosted Service Providers area is visible with Connect... and Sign up links
13+
- [ ] **Click on Connect**
14+
- [ ] Connect to GitHub dialog appears
15+
- [ ] GitHub option underlined
16+
- [ ] Cursor on username field
17+
- [ ] Login button disabled
18+
- [ ] Link to sign up at the bottom
19+
- [ ] **Fill out login information**
20+
- [ ] **On successful login**
21+
- [ ] Connect dialog disappears
22+
- [ ] GitHub invitation section in Connect page disappears
23+
- [ ] GitHub connection appears above Hosted Service Providers area with Clone, Create and Sign out action links. As long as it's above Local Git Repositories, it's good
24+
25+
# In Team Explorer Connect page (logged in)
26+
- [ ] **Click on Clone action link**
27+
- [ ] Clone dialog appears
28+
- [ ] List of user repositories is populated
29+
- [ ] Path field contains default cloning path C:\Users\[user]\Source\Repos
30+
- [ ] Cursor is in Search Repositories field
31+
- [ ] Clone button is disabled
32+
- [ ] Typing in the Search Repositories field filters the list
33+
- [ ] Clicking on the browse action link opens a file explorer
34+
- [ ] Selecting a directory in the file explorer changes the contents of the Path field to the new path
35+
- [ ] Selecting a repository from the list enables the clone button
36+
- [ ] ctrl-clicking a selection in the list removes the selection and disables the clone button
37+
- [ ] Hovering over the clone button (when enabled) animates the button (reversing colors)
38+
- [ ] **Select a repository and click Clone**
39+
- [ ] Clone dialog disappears
40+
- [ ] Progress bar appears in the Team Explorer Connect page with cloning progress (depending on repo size)
41+
- [ ] Notification appears in Team Explorer Connect page: "The repository was cloned successfully."
42+
- [ ] Repository shows up in the "Local Git Repositories" list
43+
- [ ] **Double-click the cloned repository in the "Local Git Repositories" list**
44+
- [ ] Team Explorer view changes to Home page
45+
- [ ] GitHub header and repo information is shown
46+
- [ ] **Click on Create action link**
47+
- [ ] Create dialog appears
48+
- [ ] Cursor is on the Name field
49+
- [ ] Create button is disabled
50+
- [ ] Local path is set to default cloning path C:\Users\[user]\Source\Repos
51+
- [ ] Git ignore is set to VisualStudio
52+
- [ ] User is set to current logged user
53+
- [ ] Tabbing through the fields follows visual placement of fields
54+
- [ ] Filling the name field enables the Create button
55+
- [ ] Hovering over the Create button animates it (reversing colors)
56+
- [ ] Clicking on the browse action link opens a file explorer
57+
- [ ] Selecting a directory in the file explorer changes the contents of the Path field to the new path
58+
- [ ] **Fill out the name field and click Create**
59+
- [ ] Dialog disappears
60+
- [ ] Notification appears in Team Explorer Connect page: "The repository was created successfully"
61+
- [ ] Repository shows up in the "Local Git Repositories" list
62+
- [ ] **Double-click the created repository in the "Local Git Repositories" list**
63+
- [ ] Team Explorer view changes to Home page
64+
- [ ] GitHub header and repo information is shown
65+
- [ ] **Publishing a local repo**
66+
- [ ] File - New - Project - Console Application (or any type of project, doesn't matter much)
67+
- [ ] Select "Add to source control" from the dialog and click Ok
68+
- [ ] Select "Git" from the Choose Source Control dialog
69+
- [ ] Verify that Team Explorer home page does *not* have a GitHub section
70+
- [ ] **Click "Sync"**
71+
- [ ] Synchronization page opens with "Publish to GitHub" section
72+
- [ ] **Click "Get Started" in the "Publish to GitHub" section**
73+
- [ ] Contents of section change to a publish form with:
74+
- [ ] User dropdown
75+
- [ ] Pre-filled name field with project name
76+
- [ ] Description field
77+
- [ ] Private checkbox
78+
- [ ] Publish button
79+
- [ ] **Publish button is enabled and private checkbox is unchecked (and disabled if user cannot create private repos)**
80+
- [ ] Click on "Publish"
81+
- [ ] Form becomes disabled
82+
- [ ] Progress bar appears above Synchronization title
83+
- [ ] Team Explorer view changes to Home page
84+
- [ ] Notification appears: "Repository published successfully"
85+
86+
# Connect page when logged in to TFS
87+
- [ ] **Connect to a TFS project**
88+
- [ ] Login to GitHub
89+
- [ ] Team Explorer Connect page: GitHub section appears above TFS section with Clone | Create | Sign out links
90+
- [ ] Log out of GitHub
91+
- [ ] Team Explorer Connect page: GitHub section appears above TFS section with Clone | Create | Login links
92+
- [ ] Disconnect from TFS (right click on project and "Remove"
93+
- [ ] Team Explorer Connect page: GitHub invitation section appears in Hosted Service Providers with Connect.. and Sign up links
94+
95+
# Connections
96+
- [ ] **Login to GitHub.com, then click on the "Manage Connections" header and "Connect to GitHub"**
97+
- [ ] Login dialog appears
98+
- [ ] GitHub Enterprise is underlined
99+
- [ ] Form has 3 fields - username, password and address
100+
- [ ] Login button is disabled
101+
- [ ] **Login to an enterprise instance**
102+
- [ ] Team Explorer Connect page shows two github connections - one titled GitHub, another with the enterprise url

src/DesignTimeStyleHelper/App.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ T Create<T>() where T : class
110110
return new Mock<T>().Object;
111111
}
112112

113-
object Create(Type t)
113+
static object Create(Type t)
114114
{
115115
var moq = typeof(Mock<>).MakeGenericType(t);
116116
var ctor = moq.GetConstructor(new Type[] { });
117-
var m = ctor.Invoke(new object[] { }) as Mock;
118-
return m.Object;
117+
var m = ctor?.Invoke(new object[] { }) as Mock;
118+
return m?.Object;
119119
}
120120

121121
public ExportProvider DefaultExportProvider { get; set; }

src/GitHub.Exports/Extensions/VSExtensions.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,6 @@ public static void AddDynamicMenuItem(this IServiceProvider provider,
121121

122122
public static class ISolutionExtensions
123123
{
124-
public static UriString GetRepoUrlFromSolution(IVsSolution solution)
125-
{
126-
string solutionDir, solutionFile, userFile;
127-
if (!ErrorHandler.Succeeded(solution.GetSolutionInfo(out solutionDir, out solutionFile, out userFile)))
128-
return null;
129-
if (solutionDir == null)
130-
return null;
131-
return GitService.GitServiceHelper.GetUri(solutionDir);
132-
}
133-
134124
public static IRepository GetRepoFromSolution(this IVsSolution solution)
135125
{
136126
string solutionDir, solutionFile, userFile;

src/GitHub.Exports/Primitives/HostAddress.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public override bool Equals(object obj)
9898
if (ReferenceEquals(this, obj))
9999
return true;
100100
var other = obj as HostAddress;
101-
return obj != null && WebUri.IsSameHost(other.WebUri) && ApiUri.IsSameHost(other.ApiUri);
101+
return other != null && WebUri.IsSameHost(other.WebUri) && ApiUri.IsSameHost(other.ApiUri);
102102
}
103103
}
104104
}

src/GitHub.Exports/Primitives/UriString.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ bool ParseScpSyntax(string scpString)
108108
Host = match.Groups["host"].Value.ToNullIfEmpty();
109109
Owner = match.Groups["owner"].Value.ToNullIfEmpty();
110110
RepositoryName = GetRepositoryName(match.Groups["repo"].Value);
111+
IsScpUri = true;
111112
return true;
112113
}
113114
return false;
@@ -123,15 +124,18 @@ bool ParseScpSyntax(string scpString)
123124

124125
public bool IsFileUri { get; private set; }
125126

127+
public bool IsScpUri { get; private set; }
128+
126129
public bool IsValidUri => url != null;
127130

128131
/// <summary>
129132
/// Attempts a best-effort to convert the remote origin to a GitHub Repository URL.
130133
/// </summary>
131-
/// <returns></returns>
134+
/// <returns>A converted uri, or the existing one if we can't convert it (which might be null)</returns>
132135
public Uri ToRepositoryUrl()
133136
{
134-
if (url != null && IsFileUri) return url;
137+
// we only want to process urls that represent network resources
138+
if (!IsScpUri && (!IsValidUri || IsFileUri)) return url;
135139

136140
var scheme = url != null && IsHypertextTransferProtocol
137141
? url.Scheme

src/GitHub.Exports/Services/GitService.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ public static UriString GetOriginUri(IRepository repo)
167167
{
168168
return repo
169169
?.Network
170-
.Remotes
171-
.FirstOrDefault(x => x.Name.Equals("origin", StringComparison.Ordinal))
170+
.Remotes["origin"]
172171
?.Url;
173172
}
174173

src/GitHub.UI.Reactive/Controls/SimpleViewUserControl.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
using System;
2-
using System.Diagnostics;
32
using System.Reactive.Linq;
43
using System.Reactive.Subjects;
4+
using System.Windows;
55
using System.Windows.Controls;
6-
using System.Windows.Documents;
76
using System.Windows.Input;
8-
using System.Windows.Navigation;
9-
using ReactiveUI;
10-
using System.Windows;
117
using GitHub.ViewModels;
128
using NullGuard;
9+
using ReactiveUI;
1310

1411
namespace GitHub.UI
1512
{
@@ -38,11 +35,11 @@ public SimpleViewUserControl()
3835
});
3936
}
4037

41-
public IObservable<object> Done { get { return close; } }
38+
public IObservable<object> Done => close;
4239

43-
public IObservable<object> Cancel { get { return cancel; } }
40+
public IObservable<object> Cancel => cancel;
4441

45-
public IObservable<bool> IsBusy{ get { return isBusy; } }
42+
public IObservable<bool> IsBusy => isBusy;
4643

4744
protected void NotifyDone()
4845
{
@@ -110,7 +107,7 @@ public TViewModel ViewModel
110107
TViewModel IViewFor<TViewModel>.ViewModel
111108
{
112109
get { return ViewModel; }
113-
set { ViewModel = (TViewModel)value; }
110+
set { ViewModel = value; }
114111
}
115112
}
116113
}

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</NuGetPackageImportStamp>
99
<TargetFrameworkProfile />
1010
<BuildType Condition="Exists('..\..\script\ApiClientConfiguration.cs')">Internal</BuildType>
11-
<ApplicationVersion>1.0.15.2</ApplicationVersion>
11+
<ApplicationVersion>1.0.99.0</ApplicationVersion>
1212
</PropertyGroup>
1313
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1414
<PropertyGroup>

src/GitHub.VisualStudio/UI/Views/Controls/LoginControl.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using GitHub.Extensions;
88
using GitHub.UI;
99
using GitHub.ViewModels;
10-
using NullGuard;
1110
using ReactiveUI;
1211
using System.ComponentModel.Composition;
1312

src/GitHub.VisualStudio/source.extension.vsixmanifest

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
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="c3d3dc68-c977-411f-b3e8-03b0dccf7dfc" Version="1.0.15.2" Language="en-US" Publisher="GitHub, Inc" />
4+
<Identity Id="c3d3dc68-c977-411f-b3e8-03b0dccf7dfc" Version="1.0.99.0" Language="en-US" Publisher="GitHub, Inc" />
55
<DisplayName>GitHub Extension for Visual Studio</DisplayName>
66
<Description xml:space="preserve">A Visual Studio Extension that brings the GitHub Flow into Visual Studio.</Description>
77
<MoreInfo>https://visualstudio.github.com</MoreInfo>

0 commit comments

Comments
 (0)