Skip to content

Removing NoStatus from the module #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading