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

Commit 02a80e7

Browse files
committed
Merge branch 'fixes/2478-default-github-login' of https://github.com/github/VisualStudio into fixes/2478-default-github-login
2 parents ceef3e3 + cb67cf5 commit 02a80e7

File tree

5 files changed

+105
-8
lines changed

5 files changed

+105
-8
lines changed

.github/workflows/main.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
env:
6+
config: Release
7+
githubvsSolution: GitHubVS.sln
8+
vsixContainer: ${{ github.workspace }}\GitHub.VisualStudio.vsix
9+
10+
# Controls when the action will run. Triggers the workflow on push or pull request
11+
# events but only for the master branch
12+
on:
13+
push:
14+
branches: [ master ]
15+
pull_request:
16+
branches: [ master ]
17+
18+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
19+
jobs:
20+
# This workflow contains a single job called "build"
21+
build:
22+
# The type of runner that the job will run on
23+
runs-on: windows-latest
24+
25+
# Steps represent a sequence of tasks that will be executed as part of the job
26+
steps:
27+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
28+
- uses: actions/checkout@v1
29+
with:
30+
submodules: true
31+
32+
- name: Nerdbank.GitVersioning
33+
uses: aarnott/nbgv@v0.3
34+
id: nbgv
35+
36+
- name: Add MSBuild to PATH
37+
uses: microsoft/setup-msbuild@v1.0.0
38+
39+
- uses: nuget/setup-nuget@v1
40+
with:
41+
nuget-version: '5.x'
42+
43+
- name: Add VSTest to PATH
44+
uses: darenm/Setup-VSTest@v1
45+
46+
- name: NuGet restore ${{ env.githubvsSolution }}
47+
run: nuget restore ${{ env.githubvsSolution }}
48+
49+
- name: MSBuild ${{ env.githubvsSolution }}
50+
run: |
51+
msbuild ${{ env.githubvsSolution }} /p:Configuration=${{ env.config }} /p:TargetVsixContainer=${{ env.vsixContainer }} /p:DeployExtension=False /verbosity:minimal
52+
env:
53+
GitHubVS_ClientId: ${{ secrets.GitHubVS_ClientId }}
54+
GitHubVS_ClientSecret: ${{ secrets.GitHubVS_ClientSecret }}
55+
56+
- name: Upload VSIX artifact
57+
uses: actions/upload-artifact@v1
58+
with:
59+
name: GitHubVS-${{ steps.nbgv.outputs.SemVer2 }}
60+
path: ${{ env.vsixContainer }}
61+
62+
# We need to run '**\bin\**\*Tests.dll'
63+
- run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.App.UnitTests\bin\${{ env.config }}\net46\GitHub.App.UnitTests.dll
64+
continue-on-error: true
65+
- run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.Exports.Reactive.UnitTests\bin\${{ env.config }}\net46\GitHub.Exports.Reactive.UnitTests.dll
66+
continue-on-error: true
67+
- run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.Exports.UnitTests\bin\${{ env.config }}\net46\GitHub.Exports.UnitTests.dll
68+
continue-on-error: true
69+
- run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.Extensions.UnitTests\bin\${{ env.config }}\net46\GitHub.Extensions.UnitTests.dll
70+
continue-on-error: true
71+
- run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.InlineReviews.UnitTests\bin\${{ env.config }}\net46\GitHub.InlineReviews.UnitTests.dll
72+
continue-on-error: true
73+
- run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.Services.Vssdk.UnitTests\bin\${{ env.config }}\net461\GitHub.Services.Vssdk.UnitTests.dll
74+
continue-on-error: true
75+
- run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.StartPage.UnitTests\bin\${{ env.config }}\net46\GitHub.StartPage.UnitTests.dll
76+
continue-on-error: true
77+
- run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.TeamFoundation.UnitTests\bin\${{ env.config }}\net46\GitHub.TeamFoundation.UnitTests.dll
78+
continue-on-error: true
79+
- run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.UI.UnitTests\bin\${{ env.config }}\net46\GitHub.UI.UnitTests.dll
80+
continue-on-error: true
81+
- run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\GitHub.VisualStudio.UnitTests\bin\${{ env.config }}\net46\GitHub.VisualStudio.UnitTests.dll
82+
continue-on-error: true
83+
- run: vstest.console /TestAdapterPath:test /Settings:test\test.runsettings test\MetricsTests\MetricsTests\bin\${{ env.config }}\MetricsTests.dll
84+
continue-on-error: true

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Most of the extension UI lives in the Team Explorer pane, which is available fro
77

88
Official builds of this extension are available at the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=GitHub.GitHubExtensionforVisualStudio).
99

10-
[![Build Status](https://github-editor-tools.visualstudio.com/VisualStudio/_apis/build/status/github.VisualStudio?branchName=master)](https://github-editor-tools.visualstudio.com/VisualStudio/_build/latest?definitionId=10&branchName=master)
10+
![CI](https://github.com/github/visualstudio/workflows/CI/badge.svg)
1111

1212
[![Follow GitHub for Visual Studio](https://img.shields.io/twitter/follow/GitHubVS.svg?style=social "Follow GitHubVS")](https://twitter.com/githubvs?ref_src=twsrc%5Etfw) [![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)
1313

@@ -72,4 +72,3 @@ Visit the [Contributor Guidelines](CONTRIBUTING.md) for details on how to contri
7272
Copyright 2015 - 2019 GitHub, Inc.
7373

7474
Licensed under the [MIT License](LICENSE.md)
75-

src/GitHub.Api/GitHub.Api.csproj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
<DebugType>full</DebugType>
55
<DebugSymbols>true</DebugSymbols>
66
</PropertyGroup>
7-
7+
8+
<PropertyGroup>
9+
<!-- Use a default client ID/secret for testing -->
10+
<!-- https://github.com/organizations/editor-tools/settings/applications/620133 -->
11+
<GitHubVS_ClientId Condition="'$(GitHubVS_ClientId)' == ''">2454a3e6102fd41cc212</GitHubVS_ClientId>
12+
<GitHubVS_ClientSecret Condition="'$(GitHubVS_ClientSecret)' == ''">2157c138e970165d955d09562230afcfbcda23f2</GitHubVS_ClientSecret>
13+
</PropertyGroup>
14+
815
<Import Project="$(SolutionDir)\src\common\signing.props" />
916

1017
<Target Name="AddClientSecret" BeforeTargets="BeforeCompile"

src/GitHub.App/ViewModels/GitHubPane/GitHubPaneViewModel.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,14 @@ public GitHubPaneViewModel(
160160
},
161161
currentPage.Select(x => x is IOpenInBrowser));
162162

163+
BrowseRepository = ReactiveCommand.Create(
164+
() =>
165+
{
166+
var url = LocalRepository.CloneUrl.ToRepositoryUrl();
167+
if (url != null) browser.OpenUrl(url);
168+
},
169+
currentPage.Select(x => x is IOpenInBrowser));
170+
163171
help = ReactiveCommand.Create(() => { });
164172
help.Subscribe(_ =>
165173
{
@@ -531,5 +539,7 @@ static Regex CreateRoute(string route)
531539
var routeFormat = "^" + new Regex("(:([a-z]+))\\b").Replace(route, @"(?<$2>[\w_.\-=]+)") + "$";
532540
return new Regex(routeFormat, RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase);
533541
}
542+
543+
public ReactiveCommand<Unit, Unit> BrowseRepository { get; }
534544
}
535545
}

src/GitHub.VisualStudio.UI/Views/GitHubPane/GitHubPaneView.xaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,8 @@
5757
<Separator Margin="5,-2,5,0"
5858
Foreground="{DynamicResource GitHubPaneTitleBrush}"
5959
Style="{StaticResource TitleVerticalSeparator}" />
60-
<TextBlock Margin="0,-5,0,0"
61-
VerticalAlignment="Center"
62-
Foreground="{DynamicResource GitHubVsGrayText}"
63-
Text="{Binding LocalRepository.Name}" />
64-
</StackPanel>
60+
<ghfvs:GitHubActionLink Margin="0,-2.5,0,0" Command="{Binding BrowseRepository}" Content="{Binding LocalRepository.Name}" />
61+
</StackPanel>
6562

6663
<Separator Margin="0,0,0,2"
6764
DockPanel.Dock="Top"

0 commit comments

Comments
 (0)