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

Commit 22c7c76

Browse files
committed
Merge branch 'master' into fixes/1666-filter-pr-solution-explorer
2 parents a0c218d + 9175b2f commit 22c7c76

File tree

238 files changed

+10495
-3494
lines changed

Some content is hidden

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

238 files changed

+10495
-3494
lines changed

.editorconfig

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,73 @@
11
# top-most EditorConfig file
22
root = true
33

4-
[*.cs]
4+
[*.{cs,vb}]
5+
56
indent_style = space
6-
indent_size = 4
7+
indent_size = 4
8+
9+
# Organize usings
10+
dotnet_sort_system_directives_first = true
11+
12+
# this. preferences
13+
dotnet_style_qualification_for_field = false:silent
14+
dotnet_style_qualification_for_property = false:silent
15+
dotnet_style_qualification_for_method = false:silent
16+
dotnet_style_qualification_for_event = false:silent
17+
18+
# Language keywords vs BCL types preferences
19+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
20+
dotnet_style_predefined_type_for_member_access = true:suggestion
21+
22+
# Parentheses preferences
23+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
24+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
25+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
26+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
27+
28+
# Modifier preferences
29+
dotnet_style_require_accessibility_modifiers = never:silent
30+
dotnet_style_readonly_field = true:suggestion
31+
32+
# Expression-level preferences
33+
dotnet_style_object_initializer = true:suggestion
34+
dotnet_style_collection_initializer = true:suggestion
35+
dotnet_style_explicit_tuple_names = true:suggestion
36+
dotnet_style_null_propagation = true:suggestion
37+
dotnet_style_coalesce_expression = true:suggestion
38+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
39+
dotnet_style_prefer_auto_properties = true:silent
40+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
41+
dotnet_style_prefer_conditional_expression_over_return = true:silent
42+
43+
[*.cs]
44+
45+
# var preferences
46+
csharp_style_var_for_built_in_types = true:suggestion
47+
csharp_style_var_when_type_is_apparent = true:suggestion
48+
csharp_style_var_elsewhere = true:suggestion
49+
50+
# Expression-bodied members
51+
csharp_style_expression_bodied_methods = false:none
52+
csharp_style_expression_bodied_constructors = false:none
53+
csharp_style_expression_bodied_operators = false:none
54+
csharp_style_expression_bodied_properties = false:none
55+
csharp_style_expression_bodied_indexers = false:none
56+
csharp_style_expression_bodied_accessors = false:none
57+
58+
# Pattern matching preferences
59+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
60+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
61+
62+
# Null-checking preferences
63+
csharp_style_throw_expression = true:suggestion
64+
csharp_style_conditional_delegate_call = true:suggestion
65+
66+
# Expression-level preferences
67+
csharp_prefer_braces = true:suggestion
68+
csharp_style_deconstructed_variable_declaration = true:suggestion
69+
csharp_prefer_simple_default_expression = true:suggestion
70+
csharp_style_inlined_variable_declaration = true:suggestion
71+
72+
# Spacing options
73+
csharp_space_after_keywords_in_control_flow_statements = true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<ProjectConfiguration>
2+
<Settings>
3+
<CopyReferencedAssembliesToWorkspace>True</CopyReferencedAssembliesToWorkspace>
4+
</Settings>
5+
</ProjectConfiguration>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<ProjectConfiguration>
2+
<Settings>
3+
<CopyReferencedAssembliesToWorkspace>True</CopyReferencedAssembliesToWorkspace>
4+
</Settings>
5+
</ProjectConfiguration>

Directory.Build.Props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22
<PropertyGroup>
33
<Product>GitHub Extension for Visual Studio</Product>
4-
<Version>2.5.9.0</Version>
4+
<Version>2.6.0.0</Version>
55
<Copyright>Copyright © GitHub, Inc. 2014-2018</Copyright>
66
<LangVersion>7.3</LangVersion>
77
</PropertyGroup>
8-
</Project>
8+
</Project>

GitHubVS.sln

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.VisualStudio", "src\
1010
EndProject
1111
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Meta", "Meta", "{72036B62-2FA6-4A22-8B33-69F698A18CF1}"
1212
ProjectSection(SolutionItems) = preProject
13+
.editorconfig = .editorconfig
1314
README.md = README.md
1415
EndProjectSection
1516
EndProject
@@ -39,6 +40,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{7B6C
3940
ProjectSection(SolutionItems) = preProject
4041
.gitattributes = .gitattributes
4142
.gitignore = .gitignore
43+
appveyor.yml = appveyor.yml
4244
scripts\build.ps1 = scripts\build.ps1
4345
scripts\Bump-Version.ps1 = scripts\Bump-Version.ps1
4446
scripts\common.ps1 = scripts\common.ps1
@@ -133,6 +135,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReactiveUI.Wpf", "submodule
133135
EndProject
134136
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InstallAndStart", "test\Launcher\InstallAndStart.csproj", "{79F32BE1-2764-4DBA-97F6-21053DE44270}"
135137
EndProject
138+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.TeamFoundation.16", "src\GitHub.TeamFoundation.16\GitHub.TeamFoundation.16.csproj", "{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}"
139+
EndProject
136140
Global
137141
GlobalSection(SolutionConfigurationPlatforms) = preSolution
138142
Debug|Any CPU = Debug|Any CPU
@@ -542,6 +546,16 @@ Global
542546
{79F32BE1-2764-4DBA-97F6-21053DE44270}.Release|Any CPU.Build.0 = Release|Any CPU
543547
{79F32BE1-2764-4DBA-97F6-21053DE44270}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU
544548
{79F32BE1-2764-4DBA-97F6-21053DE44270}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU
549+
{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
550+
{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
551+
{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU
552+
{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU
553+
{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}.DebugWithoutVsix|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU
554+
{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}.DebugWithoutVsix|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU
555+
{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
556+
{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}.Release|Any CPU.Build.0 = Release|Any CPU
557+
{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU
558+
{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU
545559
EndGlobalSection
546560
GlobalSection(SolutionProperties) = preSolution
547561
HideSolutionNode = FALSE

GitHubVS.v3.ncrunchsolution

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<AdditionalFilesToIncludeForSolution>
88
<Value>lib\**.*</Value>
99
</AdditionalFilesToIncludeForSolution>
10-
<AllowParallelTestExecution>False</AllowParallelTestExecution>
10+
<AllowParallelTestExecution>True</AllowParallelTestExecution>
1111
<ProjectConfigStoragePathRelativeToSolutionDir>.ncrunch</ProjectConfigStoragePathRelativeToSolutionDir>
1212
<SolutionConfigured>True</SolutionConfigured>
1313
</Settings>

appveyor.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
os: Visual Studio 2017
2-
version: '2.5.9.{build}'
2+
version: '2.6.0.{build}'
33
skip_tags: true
44
install:
55
- ps: |
@@ -18,6 +18,8 @@ install:
1818
1919
git submodule update --recursive --force
2020
nuget restore GitHubVS.sln
21+
- choco install --no-progress BCC-MSBuildLog
22+
- choco install --no-progress BCC-Submission
2123
build_script:
2224
- ps: scripts\build.ps1 -AppVeyor -BuildNumber:$env:APPVEYOR_BUILD_NUMBER
2325
test:
@@ -30,6 +32,5 @@ on_success:
3032
script\Sign-Package -AppVeyor
3133
}
3234
on_finish:
33-
- ps: scripts\Run-CodeCoverage.ps1 -AppVeyor -Configuration:Release
34-
- IF NOT "%BCC_TOKEN%x"=="x" %USERPROFILE%\.nuget\packages\bcc-msbuildlog\0.0.2-alpha\tools\net471\BCC.MSBuildLog.exe -i output.binlog -o checkrun.json -c "%APPVEYOR_BUILD_FOLDER%"
35-
- IF NOT "%BCC_TOKEN%x"=="x" %USERPROFILE%\.nuget\packages\bcc-submission\0.0.2-alpha\tools\net471\BCC.Submission.exe -i checkrun.json -t "%BCC_TOKEN%" -h "%APPVEYOR_REPO_COMMIT%"
35+
- IF NOT "%BCC_TOKEN%x"=="x" BCCMSBuildLog --cloneRoot "%APPVEYOR_BUILD_FOLDER%" --input output.binlog --output checkrun.json --ownerRepo %APPVEYOR_REPO_NAME% --hash %APPVEYOR_REPO_COMMIT%
36+
- IF NOT "%BCC_TOKEN%x"=="x" BCCSubmission -h %APPVEYOR_REPO_COMMIT% -i checkrun.json -t %BCC_TOKEN%

codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ ignore:
3232
- "*.xaml"
3333
- "*.xaml.cs"
3434
- "**/SampleData/*"
35+
- "src/GitHub.App/sqlite-net/*"

docs/readme.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
Get GitHub for Visual Studio set up to bring the GitHub flow to Visual Studio. Authenticate to GitHub.com or GitHub Enterprise, keep the extension up-to-date, and review your preferred settings.
66

7-
### [Contributing to Projects with GitHub for Visual Studio](contributing/index.md)
7+
### [Using GitHub for Visual Studio](using/index.md)
88

9-
Use GitHub for Visual Studio to manage your projects and work with pull requests.
9+
Use GitHub for Visual Studio to manage your projects and work with pull requests.
10+
11+
### [Developing GitHub for Visual Studio](developer/readme.md)
12+
13+
Documentation for hacking on GitHub for Visual Studio.

docs/using/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to Projects with GitHub for Visual Studio
1+
# Using GitHub for Visual Studio
22

33
Use GitHub for Visual Studio to manage your projects and work with pull requests.
44

1.39 MB
Binary file not shown.
698 KB
Binary file not shown.
1.09 MB
Binary file not shown.
36.8 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/GitHub.App/GlobalSuppressions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.App.Resources.resources")]
77
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String)")]
88
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String,System.Text.Encoding)")]
9+
910
// This file is used by Code Analysis to maintain SuppressMessage
1011
// attributes that are applied to this project.
1112
// Project-level suppressions either have no target or are given
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using GitHub.ViewModels;
2+
3+
namespace GitHub.Models.Drafts
4+
{
5+
/// <summary>
6+
/// Stores a draft for a <see cref="CommentViewModel"/>
7+
/// </summary>
8+
public class CommentDraft
9+
{
10+
/// <summary>
11+
/// Gets or sets the draft comment body.
12+
/// </summary>
13+
public string Body { get; set; }
14+
}
15+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using GitHub.ViewModels.GitHubPane;
2+
3+
namespace GitHub.Models.Drafts
4+
{
5+
/// <summary>
6+
/// Stores a draft for a <see cref="PullRequestCreationViewModel"/>.
7+
/// </summary>
8+
public class PullRequestDraft
9+
{
10+
/// <summary>
11+
/// Gets or sets the draft pull request title.
12+
/// </summary>
13+
public string Title { get; set; }
14+
15+
/// <summary>
16+
/// Gets or sets the draft pull request body.
17+
/// </summary>
18+
public string Body { get; set; }
19+
}
20+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using GitHub.ViewModels;
3+
4+
namespace GitHub.Models.Drafts
5+
{
6+
/// <summary>
7+
/// Stores a draft for a <see cref="PullRequestReviewCommentViewModel"/>
8+
/// </summary>
9+
public class PullRequestReviewCommentDraft : CommentDraft
10+
{
11+
/// <summary>
12+
/// Gets or sets the side of the diff that the draft comment was left on.
13+
/// </summary>
14+
public DiffSide Side { get; set; }
15+
16+
/// <summary>
17+
/// Gets or sets the time that the draft was last updated.
18+
/// </summary>
19+
public DateTimeOffset UpdatedAt { get; set; }
20+
}
21+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using GitHub.ViewModels.GitHubPane;
2+
3+
namespace GitHub.Models.Drafts
4+
{
5+
/// <summary>
6+
/// Stores a draft for a <see cref="PullRequestReviewAuthoringViewModel"/>.
7+
/// </summary>
8+
public class PullRequestReviewDraft
9+
{
10+
/// <summary>
11+
/// Gets or sets the draft review body.
12+
/// </summary>
13+
public string Body { get; set; }
14+
}
15+
}
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
using System;
2-
using System.Collections.ObjectModel;
3-
using System.Diagnostics.CodeAnalysis;
4-
using System.Reactive;
1+
using System.Diagnostics.CodeAnalysis;
2+
using System.Threading.Tasks;
53
using GitHub.ViewModels;
64
using ReactiveUI;
75

86
namespace GitHub.SampleData
97
{
108
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
11-
public class CommentThreadViewModelDesigner : ICommentThreadViewModel
9+
public class CommentThreadViewModelDesigner : ViewModelBase, ICommentThreadViewModel
1210
{
13-
public ObservableCollection<ICommentViewModel> Comments { get; }
14-
= new ObservableCollection<ICommentViewModel>();
11+
public IReadOnlyReactiveList<ICommentViewModel> Comments { get; }
12+
= new ReactiveList<ICommentViewModel>();
1513

1614
public IActorViewModel CurrentUser { get; set; }
1715
= new ActorViewModel { Login = "shana" };
1816

19-
public ReactiveCommand<string, Unit> PostComment { get; }
20-
public ReactiveCommand<Tuple<string, string>, Unit> EditComment { get; }
21-
public ReactiveCommand<Tuple<int, int>, Unit> DeleteComment { get; }
17+
public Task DeleteComment(ICommentViewModel comment) => Task.CompletedTask;
18+
public Task EditComment(ICommentViewModel comment) => Task.CompletedTask;
19+
public Task PostComment(ICommentViewModel comment) => Task.CompletedTask;
2220
}
2321
}

src/GitHub.App/SampleData/CommentViewModelDesigner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public CommentViewModelDesigner()
2424
public bool IsSubmitting { get; set; }
2525
public bool CanDelete { get; } = true;
2626
public ICommentThreadViewModel Thread { get; }
27-
public DateTimeOffset UpdatedAt => DateTime.Now.Subtract(TimeSpan.FromDays(3));
27+
public DateTimeOffset CreatedAt => DateTime.Now.Subtract(TimeSpan.FromDays(3));
2828
public IActorViewModel Author { get; set; }
2929
public Uri WebUrl { get; }
3030

src/GitHub.App/SampleData/Dialog/Clone/SelectPageViewModelDesigner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public SelectPageViewModelDesigner()
3838
public IReadOnlyList<IRepositoryItemViewModel> Items { get; }
3939
public ICollectionView ItemsView { get; }
4040
public IRepositoryItemViewModel SelectedItem { get; set; }
41-
public IRepositoryModel Repository { get; }
41+
public RepositoryModel Repository { get; }
4242

4343
public void Initialize(IConnection connection)
4444
{

src/GitHub.App/SampleData/ForkRepositoryExecuteViewModelDesigner.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public ForkRepositoryExecuteViewModelDesigner()
3535

3636
public string Title => null;
3737

38-
public IRepositoryModel SourceRepository { get; set; }
38+
public RepositoryModel SourceRepository { get; set; }
3939

40-
public IRepositoryModel DestinationRepository { get; set; }
40+
public RepositoryModel DestinationRepository { get; set; }
4141

4242
public IAccount DestinationAccount { get; }
4343

@@ -57,7 +57,7 @@ public ForkRepositoryExecuteViewModelDesigner()
5757

5858
public string Error { get; } = "I AM ERROR";
5959

60-
public Task InitializeAsync(ILocalRepositoryModel sourceRepository, IAccount destinationAccount, IConnection connection)
60+
public Task InitializeAsync(LocalRepositoryModel sourceRepository, IAccount destinationAccount, IConnection connection)
6161
{
6262
return Task.CompletedTask;
6363
}

src/GitHub.App/SampleData/ForkRepositorySelectViewModelDesigner.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ public ForkRepositorySelectViewModelDesigner()
3333

3434
public IObservable<object> Done => null;
3535

36-
public IReadOnlyList<IRemoteRepositoryModel> ExistingForks { get; set; }
36+
public IReadOnlyList<RemoteRepositoryModel> ExistingForks { get; set; }
3737

3838
public bool IsLoading { get; set; }
3939

4040
public string Title => null;
4141

42-
public ReactiveCommand<IAccount, Unit> SelectedAccount => null;
42+
public ReactiveCommand<IAccount, IAccount> SelectedAccount => null;
4343

44-
public ReactiveCommand<IRemoteRepositoryModel, Unit> SwitchOrigin => null;
44+
public ReactiveCommand<RemoteRepositoryModel, Unit> SwitchOrigin => null;
4545

46-
public Task InitializeAsync(ILocalRepositoryModel repository, IConnection connection)
46+
public Task InitializeAsync(LocalRepositoryModel repository, IConnection connection)
4747
{
4848
return Task.CompletedTask;
4949
}

0 commit comments

Comments
 (0)