From 982712fc9e498232e4d65631b18fae3534a73707 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 31 Oct 2023 08:44:56 +0100 Subject: [PATCH] Fix shoudprocess --- .../Repositories/Repositories/New-GitHubRepository.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/GitHub/public/Repositories/Repositories/New-GitHubRepository.ps1 b/src/GitHub/public/Repositories/Repositories/New-GitHubRepository.ps1 index d6722383..aa0de853 100644 --- a/src/GitHub/public/Repositories/Repositories/New-GitHubRepository.ps1 +++ b/src/GitHub/public/Repositories/Repositories/New-GitHubRepository.ps1 @@ -266,10 +266,14 @@ switch ($PSCmdlet.ParameterSetName) { 'user' { - New-GitHubRepositoryUser @params + if ($PSCmdlet.ShouldProcess("repository for user [$repo]", 'Create')) { + New-GitHubRepositoryUser @params + } } 'org' { - New-GitHubRepositoryOrg @params + if ($PSCmdlet.ShouldProcess("repository for organization [$Owner/$Repo]", 'Create')) { + New-GitHubRepositoryOrg @params + } } } }