Skip to content

Commit 8acdc32

Browse files
committed
Fix review comments
1 parent 79c3530 commit 8acdc32

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

GitHubConfiguration.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function Set-GitHubConfiguration
244244
}
245245
}
246246

247-
if (-not $PSCmdlet.ShouldProcess('GitHubConfiguration','Save'))
247+
if (-not $PSCmdlet.ShouldProcess('GitHubConfiguration', 'Save'))
248248
{
249249
return
250250
}
@@ -512,13 +512,13 @@ function Reset-GitHubConfiguration
512512
[switch] $SessionOnly
513513
)
514514

515-
Set-TelemetryEvent -EventName Reset-GitHubConfiguration
516-
517515
if (-not $PSCmdlet.ShouldProcess('GitHub Configuration', 'Reset'))
518516
{
519517
return
520518
}
521519

520+
Set-TelemetryEvent -EventName Reset-GitHubConfiguration
521+
522522
if (-not $SessionOnly)
523523
{
524524
$null = Remove-Item -Path $script:configurationFilePath -Force -ErrorAction SilentlyContinue -ErrorVariable ev
@@ -901,6 +901,11 @@ function Set-GitHubAuthentication
901901
[switch] $SessionOnly
902902
)
903903

904+
if (-not $PSCmdlet.ShouldProcess('GitHub Authentication', 'Set'))
905+
{
906+
return
907+
}
908+
904909
if (-not $PSBoundParameters.ContainsKey('Credential'))
905910
{
906911
$message = 'Please provide your GitHub API Token in the Password field. You can enter anything in the username field (it will be ignored).'
@@ -922,11 +927,6 @@ function Set-GitHubAuthentication
922927

923928
$script:accessTokenCredential = $Credential
924929

925-
if (-not $PSCmdlet.ShouldProcess('GitHub Authentication', 'Set'))
926-
{
927-
return
928-
}
929-
930930
Write-InvocationLog
931931

932932
if (-not $SessionOnly)
@@ -969,13 +969,13 @@ function Clear-GitHubAuthentication
969969
[switch] $SessionOnly
970970
)
971971

972-
Set-TelemetryEvent -EventName Clear-GitHubAuthentication
973-
974972
if (-not $PSCmdlet.ShouldProcess('GitHub Authentication', 'Clear'))
975973
{
976974
return
977975
}
978976

977+
Set-TelemetryEvent -EventName Clear-GitHubAuthentication
978+
979979
Write-InvocationLog
980980

981981
$script:accessTokenCredential = $null

GitHubPullRequests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ filter New-GitHubPullRequest
391391
if ($PSBoundParameters.ContainsKey('Title'))
392392
{
393393
$description = "Creating pull request $Title in $RepositoryName"
394-
$shouldProcessAction = "Create GitHub Pull Request $Title"
394+
$shouldProcessAction = "Create GitHub Pull Request: $Title"
395395
$postBody['title'] = $Title
396396

397397
# Body may be whitespace, although this might not be useful

0 commit comments

Comments
 (0)