From b97dc8fb0b89d29acadc063c071c5bbbe425db8a Mon Sep 17 00:00:00 2001 From: Jaap Brasser Date: Sat, 20 Jul 2019 20:03:25 -0700 Subject: [PATCH] Added NoCode param --- Get-GitPullRequestLocal/Get-GitPullRequestLocal.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Get-GitPullRequestLocal/Get-GitPullRequestLocal.ps1 b/Get-GitPullRequestLocal/Get-GitPullRequestLocal.ps1 index 961ed0c..deb20e7 100644 --- a/Get-GitPullRequestLocal/Get-GitPullRequestLocal.ps1 +++ b/Get-GitPullRequestLocal/Get-GitPullRequestLocal.ps1 @@ -15,7 +15,8 @@ Will create a folder in C:\Temp named after the PR number, and clone the specifi [cmdletbinding(SupportsShouldProcess)] param( [string] $Uri, - [string] $Path = 'C:\Temp' + [string] $Path = 'C:\Temp', + [switch] $NoCode ) $Request = Invoke-WebRequest $Uri @@ -36,6 +37,12 @@ Will create a folder in C:\Temp named after the PR number, and clone the specifi git clone --single-branch --branch $Values.Branch $Values.GitHubUri Set-Location (Get-ChildItem).fullname + + # open VScode + If (!$nocode) { + code . + } + # Retrieve status of the current branch git status