Skip to content

Commit

Permalink
Removing NoStatus from the module (#274)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
HowardWolosky committed Aug 12, 2020
1 parent 6a51601 commit db11155
Show file tree
Hide file tree
Showing 26 changed files with 160 additions and 1,338 deletions.
52 changes: 8 additions & 44 deletions GitHubAssignees.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ filter Get-GitHubAssignee
If provided, this will be used as the AccessToken for authentication with the
REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.
.PARAMETER NoStatus
If this switch is specified, long-running commands will run on the main thread
with no commandline status update. When not specified, those commands run in
the background, enabling the command prompt to provide status information.
If not supplied here, the DefaultNoStatus configuration property value will be used.
.INPUTS
GitHub.Branch
GitHub.Content
Expand Down Expand Up @@ -66,7 +60,7 @@ filter Get-GitHubAssignee
#>
[CmdletBinding(DefaultParameterSetName = 'Elements')]
[OutputType({$script:GitHubUserTypeName})]
[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.")]
[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.")]
param(
[Parameter(ParameterSetName='Elements')]
[string] $OwnerName,
Expand All @@ -81,9 +75,7 @@ filter Get-GitHubAssignee
[Alias('RepositoryUrl')]
[string] $Uri,

[string] $AccessToken,

[switch] $NoStatus
[string] $AccessToken
)

Write-InvocationLog
Expand All @@ -103,7 +95,6 @@ filter Get-GitHubAssignee
'AccessToken' = $AccessToken
'TelemetryEventName' = $MyInvocation.MyCommand.Name
'TelemetryProperties' = $telemetryProperties
'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus)
}

return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubUserAdditionalProperties)
Expand Down Expand Up @@ -137,12 +128,6 @@ filter Test-GitHubAssignee
If provided, this will be used as the AccessToken for authentication with the
REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.
.PARAMETER NoStatus
If this switch is specified, long-running commands will run on the main thread
with no commandline status update. When not specified, those commands run in
the background, enabling the command prompt to provide status information.
If not supplied here, the DefaultNoStatus configuration property value will be used.
.INPUTS
GitHub.Branch
GitHub.Content
Expand Down Expand Up @@ -187,7 +172,7 @@ filter Test-GitHubAssignee
#>
[CmdletBinding(DefaultParameterSetName = 'Elements')]
[OutputType([bool])]
[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.")]
[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.")]
param(
[Parameter(ParameterSetName='Elements')]
[string] $OwnerName,
Expand All @@ -206,9 +191,7 @@ filter Test-GitHubAssignee
[Alias('UserName')]
[string] $Assignee,

[string] $AccessToken,

[switch] $NoStatus
[string] $AccessToken
)

Write-InvocationLog
Expand All @@ -231,7 +214,6 @@ filter Test-GitHubAssignee
'TelemetryEventName' = $MyInvocation.MyCommand.Name
'TelemetryProperties' = $telemetryProperties
'ExtendedResult'= $true
'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus)
}

try
Expand Down Expand Up @@ -279,12 +261,6 @@ function Add-GitHubAssignee
If provided, this will be used as the AccessToken for authentication with the
REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.
.PARAMETER NoStatus
If this switch is specified, long-running commands will run on the main thread
with no commandline status update. When not specified, those commands run in
the background, enabling the command prompt to provide status information.
If not supplied here, the DefaultNoStatus configuration property value will be used.
.INPUTS
GitHub.Branch
GitHub.Content
Expand Down Expand Up @@ -342,7 +318,7 @@ function Add-GitHubAssignee
DefaultParameterSetName='Elements')]
[OutputType({$script:GitHubIssueTypeName})]
[Alias('New-GitHubAssignee')] # Non-standard usage of the New verb, but done to avoid a breaking change post 0.14.0
[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.")]
[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.")]
param(
[Parameter(ParameterSetName='Elements')]
[string] $OwnerName,
Expand Down Expand Up @@ -370,9 +346,7 @@ function Add-GitHubAssignee
[Alias('UserName')]
[string[]] $Assignee,

[string] $AccessToken,

[switch] $NoStatus
[string] $AccessToken
)

begin
Expand Down Expand Up @@ -416,7 +390,6 @@ function Add-GitHubAssignee
'AcceptHeader' = $script:symmetraAcceptHeader
'TelemetryEventName' = $MyInvocation.MyCommand.Name
'TelemetryProperties' = $telemetryProperties
'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus)
}

if (-not $PSCmdlet.ShouldProcess($Issue, "Add Assignee(s) $($userNames -join ',')"))
Expand Down Expand Up @@ -462,12 +435,6 @@ function Remove-GitHubAssignee
If provided, this will be used as the AccessToken for authentication with the
REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.
.PARAMETER NoStatus
If this switch is specified, long-running commands will run on the main thread
with no commandline status update. When not specified, those commands run in
the background, enabling the command prompt to provide status information.
If not supplied here, the DefaultNoStatus configuration property value will be used.
.INPUTS
GitHub.Branch
GitHub.Content
Expand Down Expand Up @@ -532,7 +499,7 @@ function Remove-GitHubAssignee
DefaultParameterSetName='Elements',
ConfirmImpact="High")]
[OutputType({$script:GitHubIssueTypeName})]
[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.")]
[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.")]
param(
[Parameter(ParameterSetName='Elements')]
[string] $OwnerName,
Expand Down Expand Up @@ -562,9 +529,7 @@ function Remove-GitHubAssignee

[switch] $Force,

[string] $AccessToken,

[switch] $NoStatus
[string] $AccessToken
)

begin
Expand Down Expand Up @@ -618,7 +583,6 @@ function Remove-GitHubAssignee
'AcceptHeader' = $script:symmetraAcceptHeader
'TelemetryEventName' = $MyInvocation.MyCommand.Name
'TelemetryProperties' = $telemetryProperties
'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus)
}

return (Invoke-GHRestMethod @params | Add-GitHubIssueAdditionalProperties)
Expand Down

0 comments on commit db11155

Please sign in to comment.