@@ -244,7 +244,7 @@ function Set-GitHubConfiguration
244
244
}
245
245
}
246
246
247
- if (-not $PSCmdlet.ShouldProcess (' GitHubConfiguration' , ' Save' ))
247
+ if (-not $PSCmdlet.ShouldProcess (' GitHubConfiguration' , ' Save' ))
248
248
{
249
249
return
250
250
}
@@ -512,13 +512,13 @@ function Reset-GitHubConfiguration
512
512
[switch ] $SessionOnly
513
513
)
514
514
515
- Set-TelemetryEvent - EventName Reset-GitHubConfiguration
516
-
517
515
if (-not $PSCmdlet.ShouldProcess (' GitHub Configuration' , ' Reset' ))
518
516
{
519
517
return
520
518
}
521
519
520
+ Set-TelemetryEvent - EventName Reset-GitHubConfiguration
521
+
522
522
if (-not $SessionOnly )
523
523
{
524
524
$null = Remove-Item - Path $script :configurationFilePath - Force - ErrorAction SilentlyContinue - ErrorVariable ev
@@ -901,6 +901,11 @@ function Set-GitHubAuthentication
901
901
[switch ] $SessionOnly
902
902
)
903
903
904
+ if (-not $PSCmdlet.ShouldProcess (' GitHub Authentication' , ' Set' ))
905
+ {
906
+ return
907
+ }
908
+
904
909
if (-not $PSBoundParameters.ContainsKey (' Credential' ))
905
910
{
906
911
$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
922
927
923
928
$script :accessTokenCredential = $Credential
924
929
925
- if (-not $PSCmdlet.ShouldProcess (' GitHub Authentication' , ' Set' ))
926
- {
927
- return
928
- }
929
-
930
930
Write-InvocationLog
931
931
932
932
if (-not $SessionOnly )
@@ -969,13 +969,13 @@ function Clear-GitHubAuthentication
969
969
[switch ] $SessionOnly
970
970
)
971
971
972
- Set-TelemetryEvent - EventName Clear-GitHubAuthentication
973
-
974
972
if (-not $PSCmdlet.ShouldProcess (' GitHub Authentication' , ' Clear' ))
975
973
{
976
974
return
977
975
}
978
976
977
+ Set-TelemetryEvent - EventName Clear-GitHubAuthentication
978
+
979
979
Write-InvocationLog
980
980
981
981
$script :accessTokenCredential = $null
0 commit comments