From 29c924a45b85b91675975fcda0d00b5ef2cbdb03 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Thu, 6 Dec 2018 14:42:23 +0000 Subject: [PATCH 1/5] Add manifest and overview for VS Marketplace These are required when publishing to the Visual Studio Marketplace. --- marketplace/overview.md | 26 ++++++++++++++++++++++++++ marketplace/publishManifest.json | 13 +++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 marketplace/overview.md create mode 100644 marketplace/publishManifest.json diff --git a/marketplace/overview.md b/marketplace/overview.md new file mode 100644 index 0000000000..4b0ea8428b --- /dev/null +++ b/marketplace/overview.md @@ -0,0 +1,26 @@ +GitHub Extension for Visual Studio + +The [GitHub Extension for Visual Studio](https://visualstudio.github.com/) makes it easy to connect to and work with your repositories on [GitHub](https://github.com/) and [GitHub Enterprise](https://enterprise.github.com/) from directly within Visual Studio 2015 or newer. Clone existing repositories or create new ones and start collaborating! + +For more information about the extension, visit [https://visualstudio.github.com/](https://visualstudio.github.com/). + +For feedback and bug reports, please email [support@github.com](mailto:support@github.com). + +## Features + +1. **Connect** - From the Team Explorer section, click the _Connect..._ button in the GitHub invitation section to login to the extension. The extension supports two-factor authentication (2fa) with GitHub and stores credentials in the Windows Credential store so that Git Operations within Visual Studio work with your GitHub repositories. The extension also supports logging into a GitHub Enterprise instance. +2. **Clone** - Once connected, click on the _Clone_ button to list all repositories that you have access to on GitHub. +3. **Create** - The create dialog lets you create a repository on GitHub.com and locally that are connected together. +4. **Publish** - For a local-only repository, click on the Sync navigation item to get the GitHub publish control. This make it quick to publish your local work up to GitHub. +5. **Open in Visual Studio** - once you log-in with the extension, GitHub.com will show a new button next to repositories labeled "Open in VisualStudio." Click on the button to clone the repository to Visual Studio. +6. **Create Gist** - Create gists by using the GitHub context menu when you right-click on selected text +7. **Open/Link to GitHub** - Easily open on GitHub or share a link to the code you're working on by using the GitHub context menu. +8. **Pull Requests** - View your repository's Pull Requests and create new ones from the _Pull Requests_ button in the Team Explorer Home +9. **See Pull Request diffs** - See all Pull Request changes as individual diff views and open changed files directly from the Pull Request details view +10. **Review Pull Requests** - Start a review and submit a review that comments, approves, or request changes to the Pull Request +11. **Inline Comments** - Add review comments to the Pull Request changes you're reviewing directly from the VS diff view +12. **Fork** - From Team Explorer Home, fork a repository you have already cloned. + +## Requirements + +Visual Studio 2015 and above diff --git a/marketplace/publishManifest.json b/marketplace/publishManifest.json new file mode 100644 index 0000000000..a5ed51c566 --- /dev/null +++ b/marketplace/publishManifest.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json.schemastore.org/vsix-publish", + "categories": [ "coding", "source control", "team development" ], + "identity": { + "internalName": "GitHubExtensionforVisualStudio" + }, + "overview": "overview.md", // Path to the "readme" file that gets uploaded to the Marketplace. Required. + "priceCategory": "free", // Either "free", "trial", or "paid". Defaults to "free". + "publisher": "GitHub", // The name of the publisher. Required. + "private": false, // Specifies whether or not the extension should be public when uploaded. Defaults to false. + "qna": true, // Specifies whether or not the extension should have a Q&A section. Defaults to true. + "repo": "https://github.com/github/VisualStudio" // Not required. +} From 060a0e306035089d6ababac608fabdb5c4cf6232 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Thu, 6 Dec 2018 14:59:43 +0000 Subject: [PATCH 2/5] Create a marketplace artifact This artifact will contain publishManifest.json and overview.md which will be used when deploying the extension to the VS Marketplace. --- azure-pipelines.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 96623d3d47..3db8ddd2cc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -61,4 +61,9 @@ steps: - task: PublishBuildArtifacts@1 inputs: pathtoPublish: '$(Build.SourcesDirectory)\build\Release\GitHub.VisualStudio.vsix' - artifactName: 'vsix' + artifactName: 'vsix' + +- task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: '$(Build.SourcesDirectory)\marketplace' + artifactName: 'marketplace' From ad9ac72ef4e21f3d4bf4e9a67af150830017fb3f Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Thu, 6 Dec 2018 15:32:40 +0000 Subject: [PATCH 3/5] Add scripts for publishing VSIX to VS Marketplace --- marketplace/Publish-Vsix.ps1 | 35 +++++++++++++++++++++++++++++++++++ marketplace/Publish.ps1 | 15 +++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 marketplace/Publish-Vsix.ps1 create mode 100644 marketplace/Publish.ps1 diff --git a/marketplace/Publish-Vsix.ps1 b/marketplace/Publish-Vsix.ps1 new file mode 100644 index 0000000000..482c704b75 --- /dev/null +++ b/marketplace/Publish-Vsix.ps1 @@ -0,0 +1,35 @@ +[CmdletBinding(SupportsShouldProcess=$true)] +param ( + [parameter(Mandatory=$true, + HelpMessage="Publisher name which must match publisher in the manifest")] + [string] $publisherName + , + [parameter(Mandatory=$true, + HelpMessage="Token with Organization: All accessible organizations, Selected scopes: Marketplace (publish)")] + [string] $personalAccessToken + , + [parameter(Mandatory=$true, + HelpMessage="Path to the .vsix file for publishing")] + [string] $payload + , + [parameter(Mandatory=$true, + HelpMessage="Path to the publish manifest .json file")] + [string] $publishManifest = "$PSScriptRoot\publishManifest.json" +) + +Install-Module -Name VSSetup -RequiredVersion 2.2.5 -Scope CurrentUser -Force +Import-Module -Name VSSetup -Version 2.2.5 + +$VSSetupInstance = Get-VSSetupInstance | Select-VSSetupInstance -Product * -Require 'Microsoft.VisualStudio.Component.VSSDK' +$VSInstallDir=$VSSetupInstance.InstallationPath +$VsixPublisher="$VSInstallDir\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" + +if ($PSCmdlet.ShouldProcess("VsixPublisher.exe login -publisherName $publisherName -personalAccessToken $personalAccessToken", "Login")) +{ + & $VsixPublisher login -publisherName $publisherName -personalAccessToken $personalAccessToken +} + +if ($PSCmdlet.ShouldProcess("VsixPublisher.exe publish -payload $payload -publishManifest $publishManifest", "Publish")) +{ + & $VsixPublisher publish -payload $payload -publishManifest $publishManifest +} diff --git a/marketplace/Publish.ps1 b/marketplace/Publish.ps1 new file mode 100644 index 0000000000..55c8e91056 --- /dev/null +++ b/marketplace/Publish.ps1 @@ -0,0 +1,15 @@ +[CmdletBinding(SupportsShouldProcess=$true)] +param ( + [parameter(Mandatory=$true, + HelpMessage="Create token using https://dev.azure.com/github-editor-tools/_usersSettings/tokens?action=edit with Organization: All accessible organizations, Selected scopes: Marketplace (publish)")] + [string] $personalAccessToken + , + [parameter(Mandatory=$true, + HelpMessage="Path to the .vsix file for publishing")] + [string] $payload +) + +$publisherName = "GitHub" +$publishManifest ="$PSScriptRoot\publishManifest.json" + +& $PSScriptRoot\Publish-Vsix.ps1 -WhatIf:([bool]$WhatIfPreference.IsPresent) -publisherName:$publisherName -personalAccessToken:$personalAccessToken -payload:$payload -publishManifest:$publishManifest From 2686b50939bc1aab2740903db91fee5013abe5f4 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Thu, 6 Dec 2018 17:11:08 +0000 Subject: [PATCH 4/5] Add marketplace overview/metadata to solution Add as solution items in Meta section. --- GitHubVS.sln | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/GitHubVS.sln b/GitHubVS.sln index 656803d414..d75023b5d2 100644 --- a/GitHubVS.sln +++ b/GitHubVS.sln @@ -11,6 +11,8 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Meta", "Meta", "{72036B62-2FA6-4A22-8B33-69F698A18CF1}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + marketplace\overview.md = marketplace\overview.md + marketplace\publishManifest.json = marketplace\publishManifest.json README.md = README.md EndProjectSection EndProject @@ -135,7 +137,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InstallAndStart", "test\Lau EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.TeamFoundation.16", "src\GitHub.TeamFoundation.16\GitHub.TeamFoundation.16.csproj", "{F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.Services.Vssdk.UnitTests", "test\GitHub.Services.Vssdk.UnitTests\GitHub.Services.Vssdk.UnitTests.csproj", "{65542DEE-D3BE-4810-B85A-08E970413A21}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.Services.Vssdk.UnitTests", "test\GitHub.Services.Vssdk.UnitTests\GitHub.Services.Vssdk.UnitTests.csproj", "{65542DEE-D3BE-4810-B85A-08E970413A21}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -241,14 +243,6 @@ Global {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Release|Any CPU.Build.0 = Release|Any CPU {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Release|Any CPU.Build.0 = Release|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Debug|Any CPU.Build.0 = Debug|Any CPU {161DBF01-1DBF-4B00-8551-C5C00F26720D}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU @@ -475,8 +469,6 @@ Global {F08BD4BC-B5DF-4193-9B01-6D0BBE101BD7}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {65542DEE-D3BE-4810-B85A-08E970413A21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {65542DEE-D3BE-4810-B85A-08E970413A21}.Debug|Any CPU.Build.0 = Debug|Any CPU - {65542DEE-D3BE-4810-B85A-08E970413A21}.DebugCodeAnalysis|Any CPU.ActiveCfg = Debug|Any CPU - {65542DEE-D3BE-4810-B85A-08E970413A21}.DebugCodeAnalysis|Any CPU.Build.0 = Debug|Any CPU {65542DEE-D3BE-4810-B85A-08E970413A21}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU {65542DEE-D3BE-4810-B85A-08E970413A21}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {65542DEE-D3BE-4810-B85A-08E970413A21}.Release|Any CPU.ActiveCfg = Release|Any CPU From b45d870cdaefe2bdd37141a84a72bbfb24432c3e Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Thu, 6 Dec 2018 17:13:13 +0000 Subject: [PATCH 5/5] Add deploy to marketplace scripts to solution Add as solution items in Script/marketplace section. --- GitHubVS.sln | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GitHubVS.sln b/GitHubVS.sln index d75023b5d2..918f5cb31c 100644 --- a/GitHubVS.sln +++ b/GitHubVS.sln @@ -139,6 +139,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.TeamFoundation.16", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.Services.Vssdk.UnitTests", "test\GitHub.Services.Vssdk.UnitTests\GitHub.Services.Vssdk.UnitTests.csproj", "{65542DEE-D3BE-4810-B85A-08E970413A21}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "marketplace", "marketplace", "{3F96C12D-10E3-4F43-B418-C5F31272D568}" + ProjectSection(SolutionItems) = preProject + marketplace\Publish-Vsix.ps1 = marketplace\Publish-Vsix.ps1 + marketplace\Publish.ps1 = marketplace\Publish.ps1 + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -507,6 +513,7 @@ Global {C6E8D1E1-FAAC-4E02-B6A1-6164EC5E704E} = {1E7F7253-A6AF-43C4-A955-37BEDDA01AB9} {E899B03C-6E8E-4375-AB65-FC925D721D8B} = {1E7F7253-A6AF-43C4-A955-37BEDDA01AB9} {65542DEE-D3BE-4810-B85A-08E970413A21} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD} + {3F96C12D-10E3-4F43-B418-C5F31272D568} = {7B6C5F8D-14B3-443D-B044-0E209AE12BDF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {556014CF-5B35-4CE5-B3EF-6AB0007001AC}