Skip to content

Commit db11155

Browse files
Removing NoStatus from the module (#274)
The `NoStatus` parameter (and `DefaultNoStatus` config value) were deprecated as part of #253 when we stopped showing status except for multi-page requests that exceeded some minimum number of pages. At that time, `NoStatus` (and `DefaultNoStatus`) were not removed in order to minimize the churn to the module. However, keeping it in is adding unnecessary complexity to the module as we continue to expand what the module can do. This change removes `NoStatus` (and `DefaultNoStatus`) from the module entirely. The only impact that this may cause is with users who are currently using one (or both) of them. This breaking change impact should be minimal, but its best for the breaking change to be part of the coming release which already has a number of other breaking changes as well, as opposed to having more breaking changes in a successive release.
1 parent 6a51601 commit db11155

26 files changed

+160
-1338
lines changed

GitHubAssignees.ps1

+8-44
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ filter Get-GitHubAssignee
2626
If provided, this will be used as the AccessToken for authentication with the
2727
REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.
2828
29-
.PARAMETER NoStatus
30-
If this switch is specified, long-running commands will run on the main thread
31-
with no commandline status update. When not specified, those commands run in
32-
the background, enabling the command prompt to provide status information.
33-
If not supplied here, the DefaultNoStatus configuration property value will be used.
34-
3529
.INPUTS
3630
GitHub.Branch
3731
GitHub.Content
@@ -66,7 +60,7 @@ filter Get-GitHubAssignee
6660
#>
6761
[CmdletBinding(DefaultParameterSetName = 'Elements')]
6862
[OutputType({$script:GitHubUserTypeName})]
69-
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSReviewUnusedParameter", "", Justification="One or more parameters (like NoStatus) are only referenced by helper methods which get access to it from the stack via Get-Variable -Scope 1.")]
63+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSReviewUnusedParameter", "", Justification="The Uri parameter is only referenced by Resolve-RepositoryElements which get access to it from the stack via Get-Variable -Scope 1.")]
7064
param(
7165
[Parameter(ParameterSetName='Elements')]
7266
[string] $OwnerName,
@@ -81,9 +75,7 @@ filter Get-GitHubAssignee
8175
[Alias('RepositoryUrl')]
8276
[string] $Uri,
8377

84-
[string] $AccessToken,
85-
86-
[switch] $NoStatus
78+
[string] $AccessToken
8779
)
8880

8981
Write-InvocationLog
@@ -103,7 +95,6 @@ filter Get-GitHubAssignee
10395
'AccessToken' = $AccessToken
10496
'TelemetryEventName' = $MyInvocation.MyCommand.Name
10597
'TelemetryProperties' = $telemetryProperties
106-
'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus)
10798
}
10899

109100
return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubUserAdditionalProperties)
@@ -137,12 +128,6 @@ filter Test-GitHubAssignee
137128
If provided, this will be used as the AccessToken for authentication with the
138129
REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.
139130
140-
.PARAMETER NoStatus
141-
If this switch is specified, long-running commands will run on the main thread
142-
with no commandline status update. When not specified, those commands run in
143-
the background, enabling the command prompt to provide status information.
144-
If not supplied here, the DefaultNoStatus configuration property value will be used.
145-
146131
.INPUTS
147132
GitHub.Branch
148133
GitHub.Content
@@ -187,7 +172,7 @@ filter Test-GitHubAssignee
187172
#>
188173
[CmdletBinding(DefaultParameterSetName = 'Elements')]
189174
[OutputType([bool])]
190-
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSReviewUnusedParameter", "", Justification="One or more parameters (like NoStatus) are only referenced by helper methods which get access to it from the stack via Get-Variable -Scope 1.")]
175+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSReviewUnusedParameter", "", Justification="The Uri parameter is only referenced by Resolve-RepositoryElements which get access to it from the stack via Get-Variable -Scope 1.")]
191176
param(
192177
[Parameter(ParameterSetName='Elements')]
193178
[string] $OwnerName,
@@ -206,9 +191,7 @@ filter Test-GitHubAssignee
206191
[Alias('UserName')]
207192
[string] $Assignee,
208193

209-
[string] $AccessToken,
210-
211-
[switch] $NoStatus
194+
[string] $AccessToken
212195
)
213196

214197
Write-InvocationLog
@@ -231,7 +214,6 @@ filter Test-GitHubAssignee
231214
'TelemetryEventName' = $MyInvocation.MyCommand.Name
232215
'TelemetryProperties' = $telemetryProperties
233216
'ExtendedResult'= $true
234-
'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus)
235217
}
236218

237219
try
@@ -279,12 +261,6 @@ function Add-GitHubAssignee
279261
If provided, this will be used as the AccessToken for authentication with the
280262
REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.
281263
282-
.PARAMETER NoStatus
283-
If this switch is specified, long-running commands will run on the main thread
284-
with no commandline status update. When not specified, those commands run in
285-
the background, enabling the command prompt to provide status information.
286-
If not supplied here, the DefaultNoStatus configuration property value will be used.
287-
288264
.INPUTS
289265
GitHub.Branch
290266
GitHub.Content
@@ -342,7 +318,7 @@ function Add-GitHubAssignee
342318
DefaultParameterSetName='Elements')]
343319
[OutputType({$script:GitHubIssueTypeName})]
344320
[Alias('New-GitHubAssignee')] # Non-standard usage of the New verb, but done to avoid a breaking change post 0.14.0
345-
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSReviewUnusedParameter", "", Justification="One or more parameters (like NoStatus) are only referenced by helper methods which get access to it from the stack via Get-Variable -Scope 1.")]
321+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSReviewUnusedParameter", "", Justification="The Uri parameter is only referenced by Resolve-RepositoryElements which get access to it from the stack via Get-Variable -Scope 1.")]
346322
param(
347323
[Parameter(ParameterSetName='Elements')]
348324
[string] $OwnerName,
@@ -370,9 +346,7 @@ function Add-GitHubAssignee
370346
[Alias('UserName')]
371347
[string[]] $Assignee,
372348

373-
[string] $AccessToken,
374-
375-
[switch] $NoStatus
349+
[string] $AccessToken
376350
)
377351

378352
begin
@@ -416,7 +390,6 @@ function Add-GitHubAssignee
416390
'AcceptHeader' = $script:symmetraAcceptHeader
417391
'TelemetryEventName' = $MyInvocation.MyCommand.Name
418392
'TelemetryProperties' = $telemetryProperties
419-
'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus)
420393
}
421394

422395
if (-not $PSCmdlet.ShouldProcess($Issue, "Add Assignee(s) $($userNames -join ',')"))
@@ -462,12 +435,6 @@ function Remove-GitHubAssignee
462435
If provided, this will be used as the AccessToken for authentication with the
463436
REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.
464437
465-
.PARAMETER NoStatus
466-
If this switch is specified, long-running commands will run on the main thread
467-
with no commandline status update. When not specified, those commands run in
468-
the background, enabling the command prompt to provide status information.
469-
If not supplied here, the DefaultNoStatus configuration property value will be used.
470-
471438
.INPUTS
472439
GitHub.Branch
473440
GitHub.Content
@@ -532,7 +499,7 @@ function Remove-GitHubAssignee
532499
DefaultParameterSetName='Elements',
533500
ConfirmImpact="High")]
534501
[OutputType({$script:GitHubIssueTypeName})]
535-
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSReviewUnusedParameter", "", Justification="One or more parameters (like NoStatus) are only referenced by helper methods which get access to it from the stack via Get-Variable -Scope 1.")]
502+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSReviewUnusedParameter", "", Justification="The Uri parameter is only referenced by Resolve-RepositoryElements which get access to it from the stack via Get-Variable -Scope 1.")]
536503
param(
537504
[Parameter(ParameterSetName='Elements')]
538505
[string] $OwnerName,
@@ -562,9 +529,7 @@ function Remove-GitHubAssignee
562529

563530
[switch] $Force,
564531

565-
[string] $AccessToken,
566-
567-
[switch] $NoStatus
532+
[string] $AccessToken
568533
)
569534

570535
begin
@@ -618,7 +583,6 @@ function Remove-GitHubAssignee
618583
'AcceptHeader' = $script:symmetraAcceptHeader
619584
'TelemetryEventName' = $MyInvocation.MyCommand.Name
620585
'TelemetryProperties' = $telemetryProperties
621-
'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus)
622586
}
623587

624588
return (Invoke-GHRestMethod @params | Add-GitHubIssueAdditionalProperties)

0 commit comments

Comments
 (0)