diff --git a/GitHubConfiguration.ps1 b/GitHubConfiguration.ps1 index e6be119c..43c29837 100644 --- a/GitHubConfiguration.ps1 +++ b/GitHubConfiguration.ps1 @@ -244,7 +244,7 @@ function Set-GitHubConfiguration } } - if (-not $PSCmdlet.ShouldProcess('GitHubConfiguration',' Save')) + if (-not $PSCmdlet.ShouldProcess('GitHubConfiguration','Save')) { return } @@ -344,7 +344,7 @@ function Save-GitHubConfiguration [string] $Path ) - if (-not $PSCmdlet.ShouldProcess('GitHub Configuration','Save')) + if (-not $PSCmdlet.ShouldProcess('GitHub Configuration', 'Save')) { return } @@ -514,7 +514,7 @@ function Reset-GitHubConfiguration Set-TelemetryEvent -EventName Reset-GitHubConfiguration - if (-not $PSCmdlet.ShouldProcess('GitHub Configuration','Reset')) + if (-not $PSCmdlet.ShouldProcess('GitHub Configuration', 'Reset')) { return } diff --git a/GitHubIssueComments.ps1 b/GitHubIssueComments.ps1 index ab1613c9..7f0de54a 100644 --- a/GitHubIssueComments.ps1 +++ b/GitHubIssueComments.ps1 @@ -550,7 +550,7 @@ filter Set-GitHubIssueComment 'body' = $Body } - if (-not $PSCmdlet.ShouldProcess($Issue, 'Create GitHub Issue Comment')) + if (-not $PSCmdlet.ShouldProcess($Comment, 'Update GitHub Issue Comment')) { return } diff --git a/GitHubProjectColumns.ps1 b/GitHubProjectColumns.ps1 index 210b48af..73025afb 100644 --- a/GitHubProjectColumns.ps1 +++ b/GitHubProjectColumns.ps1 @@ -477,7 +477,7 @@ filter Move-GitHubProjectColumn 'position' = $Position } - if (-not $PSCmdlet.ShouldProcess($ColumnName, 'Move GitHub Project Column')) + if (-not $PSCmdlet.ShouldProcess($Column, 'Move GitHub Project Column')) { return } diff --git a/GitHubPullRequests.ps1 b/GitHubPullRequests.ps1 index 39d2e53d..c138afb4 100644 --- a/GitHubPullRequests.ps1 +++ b/GitHubPullRequests.ps1 @@ -391,6 +391,7 @@ filter New-GitHubPullRequest if ($PSBoundParameters.ContainsKey('Title')) { $description = "Creating pull request $Title in $RepositoryName" + $shouldProcessAction = "Create GitHub Pull Request $Title" $postBody['title'] = $Title # Body may be whitespace, although this might not be useful @@ -402,6 +403,7 @@ filter New-GitHubPullRequest else { $description = "Creating pull request for issue $Issue in $RepositoryName" + $shouldProcessAction = "Create GitHub Pull Request for Issue $Issue" $postBody['issue'] = $Issue } @@ -416,7 +418,7 @@ filter New-GitHubPullRequest $acceptHeader = 'application/vnd.github.shadow-cat-preview+json' } - if (-not $PSCmdlet.ShouldProcess($Title, 'Create GitHub Pull Request')) + if (-not $PSCmdlet.ShouldProcess($RepositoryName, $shouldProcessAction)) { return }