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

Commit accbeaf

Browse files
committed
Merge master into release/1.0.99.7
2 parents 455e6e3 + d847435 commit accbeaf

File tree

144 files changed

+3026
-1940
lines changed

Some content is hidden

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

144 files changed

+3026
-1940
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ build/
2020

2121
# Roslyn cache directories
2222
*.ide/
23+
.vs/
2324

2425
# MSTest test Results
2526
[Tt]est[Rr]esult*/

ISSUE_TEMPLATE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Hello! Please read the contributing guidelines before submitting an issue.
2+
3+
- GitHub Extension version:
4+
- Visual Studio version:
5+
6+
__What happened__ (with steps, logs and screenshots, if possible)

appveyor.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: '{build}'
2+
install:
3+
- ps: >-
4+
$full_build = Test-Path env:GHFVS_KEY
5+
6+
git submodule init
7+
8+
if ($full_build) {
9+
$fileContent = "-----BEGIN RSA PRIVATE KEY-----`n"
10+
$fileContent += $env:GHFVS_KEY.Replace(' ', "`n")
11+
$fileContent += "`n-----END RSA PRIVATE KEY-----`n"
12+
Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
13+
} else {
14+
git submodule deinit script
15+
}
16+
17+
git submodule update
18+
19+
nuget restore GitHubVS.sln
20+
build_script:
21+
- cmd: msbuild "GitHubVS.sln" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Configuration=Release /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=14.0
22+
test_script:
23+
- ps: >-
24+
scripts\Run-Nunit.ps1 TrackingCollectionTests 180 Release -AppVeyor
25+
26+
scripts\Run-Xunit.ps1 UnitTests 180 Release -AppVeyor

script

scripts/Run-NUnit.ps1

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<#
2+
.SYNOPSIS
3+
Runs NUnit
4+
#>
5+
6+
[CmdletBinding()]
7+
Param(
8+
[Parameter(Mandatory=$true)]
9+
[ValidateNotNullOrEmpty()]
10+
[string]
11+
$Project,
12+
[int]
13+
$TimeoutDuration,
14+
[string]
15+
$Configuration,
16+
[switch]
17+
$AppVeyor = $false
18+
)
19+
20+
$rootDirectory = Split-Path (Split-Path $MyInvocation.MyCommand.Path)
21+
Push-Location $rootDirectory
22+
$dll = "src\$Project\bin\$Configuration\$Project.dll"
23+
24+
if ($AppVeyor) {
25+
$nunitDirectory = Join-Path $rootDirectory packages\NUnit.Runners.2.6.4\tools
26+
$consoleRunner = Join-Path $nunitDirectory nunit-console-x86.exe
27+
$args = "-noshadow", "-framework:net-4.5", "-exclude:Timings", $dll
28+
[object[]] $output = "$consoleRunner " + ($args -join " ")
29+
& $consoleRunner ($args | %{ "`"$_`"" })
30+
if($LastExitCode -ne 0) {
31+
$host.SetShouldExit($LastExitCode)
32+
}
33+
} else {
34+
$nunitDirectory = Join-Path $rootDirectory packages\NUnit.Runners.2.6.4\tools
35+
$consoleRunner = Join-Path $nunitDirectory nunit-console-x86.exe
36+
37+
$xml = Join-Path $rootDirectory "nunit-$Project.xml"
38+
$outputPath = [System.IO.Path]::GetTempFileName()
39+
40+
$args = "-noshadow", "-xml:$xml", "-framework:net-4.5", "-exclude:Timings", $dll
41+
[object[]] $output = "$consoleRunner " + ($args -join " ")
42+
43+
$process = Start-Process -PassThru -NoNewWindow -RedirectStandardOutput $outputPath $consoleRunner ($args | %{ "`"$_`"" })
44+
Wait-Process -InputObject $process -Timeout $TimeoutDuration -ErrorAction SilentlyContinue
45+
if ($process.HasExited) {
46+
$output += Get-Content $outputPath
47+
$exitCode = $process.ExitCode
48+
} else {
49+
$output += "Tests timed out. Backtrace:"
50+
$output += Get-DotNetStack $process.Id
51+
$exitCode = 9999
52+
}
53+
54+
Stop-Process -InputObject $process
55+
Remove-Item $outputPath
56+
Pop-Location
57+
58+
$result = New-Object System.Object
59+
$result | Add-Member -Type NoteProperty -Name Output -Value $output
60+
$result | Add-Member -Type NoteProperty -Name ExitCode -Value $exitCode
61+
$result
62+
}

scripts/Run-XUnit.ps1

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<#
2+
.SYNOPSIS
3+
Runs xUnit
4+
#>
5+
6+
[CmdletBinding()]
7+
Param(
8+
[Parameter(Mandatory=$true)]
9+
[ValidateNotNullOrEmpty()]
10+
[string]
11+
$Project,
12+
[int]
13+
$TimeoutDuration,
14+
[string]
15+
$Configuration,
16+
[switch]
17+
$AppVeyor = $false
18+
)
19+
20+
$rootDirectory = Split-Path (Split-Path $MyInvocation.MyCommand.Path)
21+
Push-Location $rootDirectory
22+
23+
$dll = "src\$Project\bin\$Configuration\$Project.dll"
24+
25+
if ($AppVeyor) {
26+
$xunitDirectory = Join-Path $rootDirectory packages\xunit.runner.console.2.1.0\tools
27+
$consoleRunner = Join-Path $xunitDirectory xunit.console.x86.exe
28+
$args = $dll, "-noshadow", "-parallel", "all", "-appveyor"
29+
[object[]] $output = "$consoleRunner " + ($args -join " ")
30+
& $consoleRunner ($args | %{ "`"$_`"" })
31+
if($LastExitCode -ne 0) {
32+
$host.SetShouldExit($LastExitCode)
33+
}
34+
} else {
35+
$xunitDirectory = Join-Path $rootDirectory packages\xunit.runner.console.2.1.0\tools
36+
$consoleRunner = Join-Path $xunitDirectory xunit.console.x86.exe
37+
$xml = Join-Path $rootDirectory "nunit-$Project.xml"
38+
$outputPath = [System.IO.Path]::GetTempFileName()
39+
40+
$args = $dll, "-noshadow", "-xml", $xml, "-parallel", "all"
41+
42+
[object[]] $output = "$consoleRunner " + ($args -join " ")
43+
44+
$process = Start-Process -PassThru -NoNewWindow -RedirectStandardOutput $outputPath $consoleRunner ($args | %{ "`"$_`"" })
45+
Wait-Process -InputObject $process -Timeout $TimeoutDuration -ErrorAction SilentlyContinue
46+
if ($process.HasExited) {
47+
$output += Get-Content $outputPath
48+
$exitCode = $process.ExitCode
49+
} else {
50+
$output += "Tests timed out. Backtrace:"
51+
$output += Get-DotNetStack $process.Id
52+
$exitCode = 9999
53+
}
54+
Stop-Process -InputObject $process
55+
Remove-Item $outputPath
56+
Pop-Location
57+
58+
$result = New-Object System.Object
59+
$result | Add-Member -Type NoteProperty -Name Output -Value $output
60+
$result | Add-Member -Type NoteProperty -Name ExitCode -Value $exitCode
61+
$result
62+
}

src/DesignTimeStyleHelper/DesignTimeStyleHelper.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@
120120
</Page>
121121
</ItemGroup>
122122
<ItemGroup>
123+
<Compile Include="..\common\SolutionInfo.cs">
124+
<Link>Properties\SolutionInfo.cs</Link>
125+
</Compile>
123126
<Compile Include="Properties\AssemblyInfo.cs">
124127
<SubType>Code</SubType>
125128
</Compile>
Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
11
using System.Reflection;
2-
using System.Resources;
3-
using System.Runtime.CompilerServices;
4-
using System.Runtime.InteropServices;
52
using System.Windows;
63

7-
// General Information about an assembly is controlled through the following
8-
// set of attributes. Change these attribute values to modify the information
9-
// associated with an assembly.
104
[assembly: AssemblyTitle("DesignTimeStyleHelper")]
11-
[assembly: AssemblyDescription("")]
12-
[assembly: AssemblyConfiguration("")]
13-
[assembly: AssemblyCompany("")]
14-
[assembly: AssemblyProduct("DesignTimeStyleHelper")]
15-
[assembly: AssemblyCopyright("Copyright © 2015")]
16-
[assembly: AssemblyTrademark("")]
17-
[assembly: AssemblyCulture("")]
18-
19-
// Setting ComVisible to false makes the types in this assembly not visible
20-
// to COM components. If you need to access a type in this assembly from
21-
// COM, set the ComVisible attribute to true on that type.
22-
[assembly: ComVisible(false)]
5+
[assembly: AssemblyDescription("Helper app for UI testing")]
236

247
//In order to begin building localizable applications, set
258
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
@@ -39,17 +22,3 @@
3922
//(used if a resource is not found in the page,
4023
// app, or any theme specific resource dictionaries)
4124
)]
42-
43-
44-
// Version information for an assembly consists of the following four values:
45-
//
46-
// Major Version
47-
// Minor Version
48-
// Build Number
49-
// Revision
50-
//
51-
// You can specify all the values or you can default the Build and Revision Numbers
52-
// by using the '*' as shown below:
53-
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.0.0.0")]
55-
[assembly: AssemblyFileVersion("1.0.0.0")]

src/GitHub.App/Api/ApiClient.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,20 +232,25 @@ public IObservable<PullRequest> GetPullRequestsForRepository(string owner, strin
232232
{
233233
return gitHubClient.PullRequest.GetAllForRepository(owner, name,
234234
new PullRequestRequest {
235-
State = ItemState.All,
235+
State = ItemStateFilter.All,
236236
SortProperty = PullRequestSort.Updated,
237237
SortDirection = SortDirection.Descending
238238
});
239239
}
240240

241-
public IObservable<Branch> GetBranches(string owner, string repo)
241+
public IObservable<PullRequest> CreatePullRequest(NewPullRequest pullRequest, string owner, string repo)
242242
{
243-
return gitHubClient.Repository.GetAllBranches(owner, repo);
243+
return gitHubClient.PullRequest.Create(owner, repo, pullRequest);
244244
}
245245

246-
public IObservable<PullRequest> CreatePullRequest(NewPullRequest pullRequest, string owner, string repo)
246+
public IObservable<Repository> GetRepositories()
247247
{
248-
return gitHubClient.PullRequest.Create(owner, repo, pullRequest);
248+
return gitHubClient.Repository.GetAllForCurrent();
249+
}
250+
251+
public IObservable<Branch> GetBranches(string owner, string repo)
252+
{
253+
return gitHubClient.Repository.GetAllBranches(owner, repo);
249254
}
250255
}
251256
}

src/GitHub.App/Caches/CacheIndex.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ namespace GitHub.Caches
1010
{
1111
public class CacheIndex
1212
{
13+
public const string PRPrefix = "index:pr";
14+
public const string RepoPrefix = "index:repos";
15+
public const string GitIgnoresPrefix = "index:ignores";
16+
public const string LicensesPrefix = "index:licenses";
17+
1318
public static CacheIndex Create(string key)
1419
{
1520
return new CacheIndex { IndexKey = key };

0 commit comments

Comments
 (0)