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

Commit e6761ef

Browse files
Merge branch 'master' into l10n_master_translated
2 parents 479bf27 + 4464697 commit e6761ef

File tree

125 files changed

+3557
-518
lines changed

Some content is hidden

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

125 files changed

+3557
-518
lines changed

GitHubVS.sln

+11
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Octokit.GraphQL.Core", "sub
141141
EndProject
142142
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Octokit.GraphQL", "submodules\octokit.graphql.net\Octokit.GraphQL\Octokit.GraphQL.csproj", "{791B408C-0ABC-465B-9EB1-A2422D67F418}"
143143
EndProject
144+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.StartPage.UnitTests", "test\GitHub.StartPage.UnitTests\GitHub.StartPage.UnitTests.csproj", "{B467682B-9F0E-42D8-8A20-1DE78F798793}"
145+
EndProject
144146
Global
145147
GlobalSection(SolutionConfigurationPlatforms) = preSolution
146148
Debug|Any CPU = Debug|Any CPU
@@ -493,6 +495,14 @@ Global
493495
{791B408C-0ABC-465B-9EB1-A2422D67F418}.Release|Any CPU.Build.0 = Release|Any CPU
494496
{791B408C-0ABC-465B-9EB1-A2422D67F418}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU
495497
{791B408C-0ABC-465B-9EB1-A2422D67F418}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU
498+
{B467682B-9F0E-42D8-8A20-1DE78F798793}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
499+
{B467682B-9F0E-42D8-8A20-1DE78F798793}.Debug|Any CPU.Build.0 = Debug|Any CPU
500+
{B467682B-9F0E-42D8-8A20-1DE78F798793}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU
501+
{B467682B-9F0E-42D8-8A20-1DE78F798793}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU
502+
{B467682B-9F0E-42D8-8A20-1DE78F798793}.Release|Any CPU.ActiveCfg = Release|Any CPU
503+
{B467682B-9F0E-42D8-8A20-1DE78F798793}.Release|Any CPU.Build.0 = Release|Any CPU
504+
{B467682B-9F0E-42D8-8A20-1DE78F798793}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU
505+
{B467682B-9F0E-42D8-8A20-1DE78F798793}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU
496506
EndGlobalSection
497507
GlobalSection(SolutionProperties) = preSolution
498508
HideSolutionNode = FALSE
@@ -527,6 +537,7 @@ Global
527537
{65542DEE-D3BE-4810-B85A-08E970413A21} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD}
528538
{3321CE72-26ED-4D1E-A8F5-6901FB783007} = {1E7F7253-A6AF-43C4-A955-37BEDDA01AC0}
529539
{791B408C-0ABC-465B-9EB1-A2422D67F418} = {1E7F7253-A6AF-43C4-A955-37BEDDA01AC0}
540+
{B467682B-9F0E-42D8-8A20-1DE78F798793} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD}
530541
EndGlobalSection
531542
GlobalSection(ExtensibilityGlobals) = postSolution
532543
SolutionGuid = {556014CF-5B35-4CE5-B3EF-6AB0007001AC}

appveyor.yml

+46-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
os: Visual Studio 2017
22
version: '2.8.0.{build}'
33
skip_tags: true
4+
45
install:
6+
- choco install --no-progress BCC-MSBuildLog
7+
- choco install --no-progress BCC-Submission
58
- ps: |
69
$full_build = Test-Path env:GHFVS_KEY
10+
$forVSInstaller = $env:BUILD_TYPE -eq "vsinstaller"
11+
$forPackage = $env:BUILD_TYPE -eq "package"
12+
$package = $full_build -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -or $forVSInstaller -or $forPackage)
13+
14+
$message = "Building "
15+
if ($package) { $message += "and packaging "}
16+
$message += "version " + $env:APPVEYOR_BUILD_NUMBER + " "
17+
18+
if ($full_build) { $message += "(full build)" } else { $message += "(partial build)" }
19+
if ($forVSInstaller) { $message += " for the VS installer" }
20+
Write-Host $message
21+
722
git submodule init
823
git submodule sync
924
@@ -18,19 +33,42 @@ install:
1833
1934
git submodule update --recursive --force
2035
nuget restore GitHubVS.sln
21-
- choco install --no-progress BCC-MSBuildLog
22-
- choco install --no-progress BCC-Submission
36+
2337
build_script:
24-
- ps: scripts\build.ps1 -AppVeyor -BuildNumber:$env:APPVEYOR_BUILD_NUMBER
38+
- ps: scripts\build.ps1 -AppVeyor -Package:$package -BuildNumber:$env:APPVEYOR_BUILD_NUMBER -ForVSInstaller:$forVSInstaller
39+
2540
test:
2641
categories:
2742
except:
2843
- Timings
44+
2945
on_success:
3046
- ps: |
31-
if ($full_build) {
32-
script\Sign-Package -AppVeyor
47+
if ($package) {
48+
Write-Host "Signing and packaging"
49+
script\Sign-Package -AppVeyor -ForVSInstaller:$forVSInstaller
3350
}
34-
on_finish:
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%
51+
52+
for:
53+
-
54+
branches:
55+
except:
56+
- /releases/.*-vsinstaller/
57+
environment:
58+
matrix:
59+
- BUILD_TYPE: normal
60+
-
61+
branches:
62+
only:
63+
- /releases/.*-vsinstaller/
64+
environment:
65+
matrix:
66+
- BUILD_TYPE: package
67+
- BUILD_TYPE: vsinstaller
68+
-
69+
branches:
70+
only:
71+
- master
72+
environment:
73+
matrix:
74+
- BUILD_TYPE: package

azure-pipelines.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,14 @@ steps:
4848
platform: '$(buildPlatform)'
4949
configuration: '$(buildConfiguration)'
5050

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'
51+
- task: VSTest@2
52+
inputs:
53+
searchFolder: '$(Build.SourcesDirectory)\test'
54+
testAssemblyVer2: '**\bin\**\*Tests.dll'
55+
platform: '$(buildPlatform)'
56+
configuration: '$(buildConfiguration)'
57+
diagnosticsEnabled: true
58+
runSettingsFile: '$(Build.SourcesDirectory)\test\test.runsettings'
6059

6160
- task: PublishBuildArtifacts@1
6261
inputs:

docs/using/publishing-an-existing-project-to-github.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
5. Click the **Publish to GitHub** button.
1111
![Location of the Publish to GitHub button in the Team Explorer pane](images/publish-to-github.png)
1212
6. Enter a name and description for the repository on GitHub.
13-
7. Check the **Private Repository** box if you want to upload the repository as a private repository on GitHub. You must have a [Developer, Team or Business account](https://github.com/pricing) to create private repositories.
13+
7. Check the **Private Repository** box if you want to upload the repository as a private repository on GitHub.
1414
8. Click the **Publish** button.

scripts/build.ps1

+9-8
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ Param(
3838
,
3939
[switch]
4040
$Trace = $false
41+
,
42+
[switch]
43+
$ForVSInstaller = $false
44+
4145
)
4246

4347
Set-StrictMode -Version Latest
@@ -53,6 +57,10 @@ Vsix | out-null
5357

5458
Push-Location $rootDirectory
5559

60+
if ($Package -and $BuildNumber -gt -1) {
61+
$BumpVersion = $true
62+
}
63+
5664
if ($UpdateSubmodules) {
5765
Update-Submodules
5866
}
@@ -61,13 +69,6 @@ if ($Clean) {
6169
Clean-WorkingTree
6270
}
6371

64-
$fullBuild = Test-Path env:GHFVS_KEY
65-
$publishable = $fullBuild -and $AppVeyor -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -or $env:APPVEYOR_REPO_BRANCH -eq "master")
66-
if ($publishable) { #forcing a deploy flag for CI
67-
$Package = $true
68-
$BumpVersion = $true
69-
}
70-
7172
if ($BumpVersion) {
7273
Write-Output "Bumping the version"
7374
Bump-Version -BumpBuild -BuildNumber:$BuildNumber
@@ -79,6 +80,6 @@ if ($Package) {
7980
Write-Output "Building GitHub for Visual Studio"
8081
}
8182

82-
Build-Solution GitHubVs.sln "Build" $config -Deploy:$Package
83+
Build-Solution GitHubVs.sln "Build" $config -Deploy:$Package -ForVSInstaller:$ForVSInstaller
8384

8485
Pop-Location

scripts/modules.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ New-Module -ScriptBlock {
114114
$msbuild
115115
}
116116

117-
function Build-Solution([string]$solution, [string]$target, [string]$configuration, [switch]$ForVSInstaller, [bool]$Deploy = $false) {
117+
function Build-Solution([string]$solution, [string]$target, [string]$configuration, [switch]$ForVSInstaller = $false, [bool]$Deploy = $false) {
118118
$msbuild = Find-MSBuild
119119

120120
Run-Command -Fatal { & $nuget restore $solution -NonInteractive -Verbosity detailed -MSBuildPath (Split-Path -parent $msbuild) }
@@ -185,7 +185,7 @@ New-Module -ScriptBlock {
185185

186186
New-Module -ScriptBlock {
187187
function Write-Manifest([string]$directory) {
188-
Add-Type -Path (Join-Path $rootDirectory packages\Newtonsoft.Json.6.0.8\lib\net35\Newtonsoft.Json.dll)
188+
Add-Type -Path (Join-Path $rootDirectory build\Release\Newtonsoft.Json.dll)
189189

190190
$manifest = @{
191191
NewestExtension = @{

scripts/test.ps1

+6
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ if (!$?) {
9797
$exitcode = 11
9898
}
9999

100+
Write-Output "Running GitHub.StartPage.UnitTests..."
101+
Run-NUnit test GitHub.StartPage.UnitTests $TimeoutDuration $config
102+
if (!$?) {
103+
$exitcode = 12
104+
}
105+
100106
if ($exitcode -ne 0) {
101107
$host.SetShouldExit($exitcode)
102108
}

src/GitHub.App/Models/PullRequestModel.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ public string Title
110110
}
111111
}
112112

113-
PullRequestStateEnum status;
114-
public PullRequestStateEnum State
113+
PullRequestState status;
114+
public PullRequestState State
115115
{
116116
get { return status; }
117117
set
@@ -126,8 +126,8 @@ public PullRequestStateEnum State
126126
}
127127

128128
// TODO: Remove these property once maintainer workflow has been merged to master.
129-
public bool IsOpen => State == PullRequestStateEnum.Open;
130-
public bool Merged => State == PullRequestStateEnum.Merged;
129+
public bool IsOpen => State == PullRequestState.Open;
130+
public bool Merged => State == PullRequestState.Merged;
131131

132132
int commentCount;
133133
public int CommentCount

src/GitHub.App/Properties/AssemblyInfo.cs

+2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
[assembly: XmlnsDefinition("https://github.com/github/VisualStudio", "GitHub.SampleData")]
44
[assembly: XmlnsDefinition("https://github.com/github/VisualStudio", "GitHub.SampleData.Dialog.Clone")]
5+
[assembly: XmlnsDefinition("https://github.com/github/VisualStudio", "GitHub.SampleData.Documents")]
56
[assembly: XmlnsDefinition("https://github.com/github/VisualStudio", "GitHub.ViewModels")]
67
[assembly: XmlnsDefinition("https://github.com/github/VisualStudio", "GitHub.ViewModels.Dialog")]
78
[assembly: XmlnsDefinition("https://github.com/github/VisualStudio", "GitHub.ViewModels.Dialog.Clone")]
9+
[assembly: XmlnsDefinition("https://github.com/github/VisualStudio", "GitHub.ViewModels.Documents")]
810
[assembly: XmlnsDefinition("https://github.com/github/VisualStudio", "GitHub.ViewModels.GitHubPane")]

src/GitHub.App/SampleData/CommentViewModelDesigner.cs

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
22
using System.Diagnostics.CodeAnalysis;
33
using System.Reactive;
4+
using System.Threading.Tasks;
5+
using GitHub.Models;
46
using GitHub.ViewModels;
57
using ReactiveUI;
68

@@ -22,7 +24,9 @@ public CommentViewModelDesigner()
2224
public CommentEditState EditState { get; set; }
2325
public bool IsReadOnly { get; set; }
2426
public bool IsSubmitting { get; set; }
27+
public bool CanCancel { get; } = true;
2528
public bool CanDelete { get; } = true;
29+
public string CommitCaption { get; set; } = "Comment";
2630
public ICommentThreadViewModel Thread { get; }
2731
public DateTimeOffset CreatedAt => DateTime.Now.Subtract(TimeSpan.FromDays(3));
2832
public IActorViewModel Author { get; set; }
@@ -31,7 +35,12 @@ public CommentViewModelDesigner()
3135
public ReactiveCommand<Unit, Unit> BeginEdit { get; }
3236
public ReactiveCommand<Unit, Unit> CancelEdit { get; }
3337
public ReactiveCommand<Unit, Unit> CommitEdit { get; }
34-
public ReactiveCommand<Unit, Unit> OpenOnGitHub { get; }
38+
public ReactiveCommand<Unit, Unit> OpenOnGitHub { get; } = ReactiveCommand.Create(() => { });
3539
public ReactiveCommand<Unit, Unit> Delete { get; }
40+
41+
public Task InitializeAsync(ICommentThreadViewModel thread, ActorModel currentUser, CommentModel comment, CommentEditState state)
42+
{
43+
return Task.CompletedTask;
44+
}
3645
}
3746
}

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Reactive;
33
using System.Threading.Tasks;
44
using GitHub.Models;
5+
using GitHub.Primitives;
56
using GitHub.ViewModels;
67
using GitHub.ViewModels.Dialog.Clone;
78
using ReactiveUI;
@@ -17,13 +18,13 @@ public RepositoryCloneViewModelDesigner()
1718
}
1819

1920
public string Path { get; set; }
21+
public UriString Url { get; set; }
2022
public string PathWarning { get; set; }
2123
public int SelectedTabIndex { get; set; }
2224
public string Title => null;
2325
public IObservable<object> Done => null;
2426
public IRepositorySelectViewModel GitHubTab { get; }
2527
public IRepositorySelectViewModel EnterpriseTab { get; }
26-
public IRepositoryUrlViewModel UrlTab { get; }
2728
public ReactiveCommand<Unit, Unit> Browse { get; }
2829
public ReactiveCommand<Unit, CloneDialogResult> Clone { get; }
2930

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
using GitHub.Models;
4+
using GitHub.ViewModels;
5+
using GitHub.ViewModels.Documents;
6+
using ReactiveUI;
7+
8+
namespace GitHub.SampleData.Documents
9+
{
10+
public class IssueishCommentThreadViewModelDesigner : ViewModelBase, IIssueishCommentThreadViewModel
11+
{
12+
public IActorViewModel CurrentUser { get; } = new ActorViewModelDesigner("grokys");
13+
public Task InitializeAsync(ActorModel currentUser, IssueishDetailModel model, bool addPlaceholder) => Task.CompletedTask;
14+
public Task DeleteComment(ICommentViewModel comment) => Task.CompletedTask;
15+
public Task EditComment(ICommentViewModel comment) => Task.CompletedTask;
16+
public Task PostComment(ICommentViewModel comment) => Task.CompletedTask;
17+
public Task CloseOrReopen(ICommentViewModel comment) => Task.CompletedTask;
18+
}
19+
}

0 commit comments

Comments
 (0)