diff --git a/GitHubAssignees.ps1 b/GitHubAssignees.ps1 index 79b33841..77bc3bed 100644 --- a/GitHubAssignees.ps1 +++ b/GitHubAssignees.ps1 @@ -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 @@ -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, @@ -81,9 +75,7 @@ filter Get-GitHubAssignee [Alias('RepositoryUrl')] [string] $Uri, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -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) @@ -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 @@ -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, @@ -206,9 +191,7 @@ filter Test-GitHubAssignee [Alias('UserName')] [string] $Assignee, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -231,7 +214,6 @@ filter Test-GitHubAssignee 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'ExtendedResult'= $true - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } try @@ -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 @@ -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, @@ -370,9 +346,7 @@ function Add-GitHubAssignee [Alias('UserName')] [string[]] $Assignee, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) begin @@ -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 ',')")) @@ -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 @@ -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, @@ -562,9 +529,7 @@ function Remove-GitHubAssignee [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) begin @@ -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) diff --git a/GitHubBranches.ps1 b/GitHubBranches.ps1 index fc493d27..82d693ae 100644 --- a/GitHubBranches.ps1 +++ b/GitHubBranches.ps1 @@ -39,12 +39,6 @@ filter Get-GitHubRepositoryBranch 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 @@ -99,7 +93,7 @@ filter Get-GitHubRepositoryBranch #> [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubBranchTypeName})] - [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.")] [Alias('Get-GitHubBranch')] param( [Parameter(ParameterSetName='Elements')] @@ -120,9 +114,7 @@ filter Get-GitHubRepositoryBranch [switch] $ProtectedOnly, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -148,7 +140,6 @@ filter Get-GitHubRepositoryBranch 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubBranchAdditionalProperties) @@ -188,12 +179,6 @@ filter New-GitHubRepositoryBranch 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 @@ -234,9 +219,6 @@ filter New-GitHubRepositoryBranch PositionalBinding = $false )] [OutputType({$script:GitHubBranchTypeName})] - [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.')] [Alias('New-GitHubBranch')] param( [Parameter(ParameterSetName = 'Elements')] @@ -261,9 +243,7 @@ filter New-GitHubRepositoryBranch Position = 2)] [string] $TargetBranchName, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -290,10 +270,6 @@ filter New-GitHubRepositoryBranch { $getGitHubRepositoryBranchParms['AccessToken'] = $AccessToken } - if ($PSBoundParameters.ContainsKey('NoStatus')) - { - $getGitHubRepositoryBranchParms['NoStatus'] = $NoStatus - } Write-Log -Level Verbose "Getting $BranchName branch for sha reference" $originBranch = Get-GitHubRepositoryBranch @getGitHubRepositoryBranchParms @@ -343,7 +319,6 @@ filter New-GitHubRepositoryBranch 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubBranchAdditionalProperties) @@ -383,12 +358,6 @@ filter Remove-GitHubRepositoryBranch 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 @@ -428,9 +397,7 @@ filter Remove-GitHubRepositoryBranch DefaultParameterSetName = 'Elements', PositionalBinding = $false, ConfirmImpact = 'High')] - [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.")] [Alias('Remove-GitHubBranch')] [Alias('Delete-GitHubRepositoryBranch')] [Alias('Delete-GitHubBranch')] @@ -457,9 +424,7 @@ filter Remove-GitHubRepositoryBranch [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -492,8 +457,6 @@ filter Remove-GitHubRepositoryBranch 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue ` - -Name NoStatus -ConfigValueName DefaultNoStatus) } Invoke-GHRestMethod @params | Out-Null @@ -530,12 +493,6 @@ filter Get-GitHubRepositoryBranchProtectionRule 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 @@ -568,8 +525,7 @@ filter Get-GitHubRepositoryBranchProtectionRule PositionalBinding = $false, DefaultParameterSetName = 'Elements')] [OutputType({ $script:GitHubBranchProtectionRuleTypeName })] - [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, @@ -591,9 +547,7 @@ filter Get-GitHubRepositoryBranchProtectionRule Position = 2)] [string] $BranchName, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -615,7 +569,6 @@ filter Get-GitHubRepositoryBranchProtectionRule AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubBranchProtectionRuleAdditionalProperties) @@ -700,12 +653,6 @@ filter New-GitHubRepositoryBranchProtectionRule 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.Repository GitHub.Branch @@ -733,8 +680,6 @@ filter New-GitHubRepositoryBranchProtectionRule SupportsShouldProcess, DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubBranchProtectionRuleTypeName })] - [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.')] param( [Parameter(ParameterSetName = 'Elements')] [string] $OwnerName, @@ -785,9 +730,7 @@ filter New-GitHubRepositoryBranchProtectionRule [switch] $AllowDeletions, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -979,8 +922,6 @@ filter New-GitHubRepositoryBranchProtectionRule AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus ` - -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubBranchProtectionRuleAdditionalProperties) @@ -1017,12 +958,6 @@ filter Remove-GitHubRepositoryBranchProtectionRule 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.Repository GitHub.Branch @@ -1051,8 +986,7 @@ filter Remove-GitHubRepositoryBranchProtectionRule SupportsShouldProcess, DefaultParameterSetName = 'Elements', ConfirmImpact = "High")] - [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.")] [Alias('Delete-GitHubRepositoryBranchProtectionRule')] param( [Parameter(ParameterSetName = 'Elements')] @@ -1077,9 +1011,7 @@ filter Remove-GitHubRepositoryBranchProtectionRule [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1112,8 +1044,6 @@ filter Remove-GitHubRepositoryBranchProtectionRule AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus ` - -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params | Out-Null diff --git a/GitHubConfiguration.ps1 b/GitHubConfiguration.ps1 index 29902e83..f9767c98 100644 --- a/GitHubConfiguration.ps1 +++ b/GitHubConfiguration.ps1 @@ -75,13 +75,6 @@ function Set-GitHubConfiguration Change the Application Insights instance that telemetry will be reported to (if telemetry hasn't been disabled via DisableTelemetry). - .PARAMETER DefaultNoStatus - Control if the -NoStatus switch should be passed-in by default to all methods. - The -NoStatus switch has been deprecated. Commands in this module no longer display status - on the console, thus passing in -NoStatus to a command no longer has any impact. - Therefore, the value of this configuration setting also no longer has any impact on - command execution. - .PARAMETER DefaultOwnerName The owner name that should be used with a command that takes OwnerName as a parameter when no value has been supplied. @@ -201,8 +194,6 @@ function Set-GitHubConfiguration [string] $ApplicationInsightsKey, - [switch] $DefaultNoStatus, - [string] $DefaultOwnerName, [string] $DefaultRepositoryName, @@ -307,7 +298,6 @@ function Get-GitHubConfiguration [ValidateSet( 'ApiHostName', 'ApplicationInsightsKey', - 'DefaultNoStatus', 'DefaultOwnerName', 'DefaultRepositoryName', 'DisableLogging', @@ -665,7 +655,6 @@ function Import-GitHubConfiguration 'disableSmarterObjects' = $false 'disableTelemetry' = $false 'disableUpdateCheck' = $false - 'defaultNoStatus' = $false 'defaultOwnerName' = [String]::Empty 'defaultRepositoryName' = [String]::Empty 'logPath' = $logPath @@ -824,10 +813,10 @@ function Resolve-ParameterWithDefaultConfigurationValue being null or an empty string. .EXAMPLE - Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus + Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name OwnerName -ConfigValueName DefaultOwnerName - Checks to see if the NoStatus switch was provided by the user from the calling method. If - so, uses that value. otherwise uses the DefaultNoStatus value currently configured. + Checks to see if the OwnerName was provided by the user from the calling method. If + so, uses that value. otherwise uses the DefaultOwnerName value currently configured. #> [CmdletBinding()] param( diff --git a/GitHubContents.ps1 b/GitHubContents.ps1 index 6a28e2f4..03f3cfef 100644 --- a/GitHubContents.ps1 +++ b/GitHubContents.ps1 @@ -53,12 +53,6 @@ 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 @@ -136,9 +130,7 @@ [switch] $ResultAsString, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -179,7 +171,6 @@ 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethodMultipleResult @params @@ -268,12 +259,6 @@ filter Set-GitHubContent 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 @@ -297,9 +282,6 @@ filter Set-GitHubContent Sets the contents of the README.md file on the master branch of the PowerShellForGithub repository. #> - [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.')] [CmdletBinding( SupportsShouldProcess, PositionalBinding = $false)] @@ -353,9 +335,7 @@ filter Set-GitHubContent [string] $AuthorEmail, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -441,8 +421,6 @@ filter Set-GitHubContent AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus ` - -ConfigValueName DefaultNoStatus) } try @@ -499,11 +477,6 @@ filter Set-GitHubContent $getGitHubContentParms['AccessToken'] = $AccessToken } - if ($PSBoundParameters.ContainsKey('NoStatus')) - { - $getGitHubContentParms['NoStatus'] = $NoStatus - } - $object = Get-GitHubContent @getGitHubContentParms $hashBody['sha'] = $object.sha diff --git a/GitHubCore.ps1 b/GitHubCore.ps1 index 6f5437fb..04d4aa4a 100644 --- a/GitHubCore.ps1 +++ b/GitHubCore.ps1 @@ -96,11 +96,6 @@ function Invoke-GHRestMethod used as the exception bucket value in the event of an exception. If neither is specified, no bucket value will be used. - .PARAMETER NoStatus - Deprecated switch after v0.14.0. Kept here for the time being to reduce module churn. - Specifying it does nothing. It used to control whether or not the web request would have - a corresponding progress UI. - .OUTPUTS [PSCustomObject] - The result of the REST operation, in whatever form it comes in. [FileInfo] - The temporary file created for the downloaded file if -Save was specified. @@ -149,9 +144,7 @@ function Invoke-GHRestMethod [hashtable] $TelemetryProperties = @{}, - [string] $TelemetryExceptionBucket = $null, - - [switch] $NoStatus + [string] $TelemetryExceptionBucket = $null ) Invoke-UpdateCheck @@ -607,11 +600,6 @@ function Invoke-GHRestMethodMultipleResult followed. WARNING: This might take a while depending on how many results there are. - .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. - .OUTPUTS [PSCustomObject[]] - The result of the REST operation, in whatever form it comes in. @@ -621,16 +609,8 @@ function Invoke-GHRestMethodMultipleResult Gets the first set of issues associated with this project, with the console window showing progress while awaiting the response from the REST request. - - .EXAMPLE - Invoke-GHRestMethodMultipleResult -UriFragment "repos/PowerShell/PowerShellForGitHub/issues?state=all" -Description "Get all issues" -NoStatus - - Gets the first set of issues associated with this project, - but the request happens in the foreground and there is no additional status - shown to the user until a response is returned from the REST request. #> [CmdletBinding()] - [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.")] [OutputType([Object[]])] param( [Parameter(Mandatory)] @@ -649,9 +629,7 @@ function Invoke-GHRestMethodMultipleResult [string] $TelemetryExceptionBucket = $null, - [switch] $SinglePage, - - [switch] $NoStatus + [switch] $SinglePage ) $AccessToken = Get-AccessToken -AccessToken $AccessToken @@ -685,7 +663,6 @@ function Invoke-GHRestMethodMultipleResult 'AccessToken' = $AccessToken 'TelemetryProperties' = $telemetryProperties 'TelemetryExceptionBucket' = $errorBucket - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params diff --git a/GitHubEvents.ps1 b/GitHubEvents.ps1 index 05764137..0a52683f 100644 --- a/GitHubEvents.ps1 +++ b/GitHubEvents.ps1 @@ -40,12 +40,6 @@ filter Get-GitHubEvent 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 @@ -132,9 +126,7 @@ filter Get-GitHubEvent [Alias('IssueNumber')] [int64] $Issue, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -177,7 +169,6 @@ filter Get-GitHubEvent 'AcceptHeader' = $acceptHeaders -join ',' 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubEventAdditionalProperties) diff --git a/GitHubGistComments.ps1 b/GitHubGistComments.ps1 index e2baa147..d5f2bc2d 100644 --- a/GitHubGistComments.ps1 +++ b/GitHubGistComments.ps1 @@ -36,12 +36,6 @@ filter Get-GitHubGistComment 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.Gist GitHub.GistComment @@ -80,9 +74,7 @@ filter Get-GitHubGistComment [ValidateSet('Raw', 'Text', 'Html', 'Full')] [string] $MediaType = 'Full', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -112,7 +104,6 @@ filter Get-GitHubGistComment 'AcceptHeader' = (Get-MediaAcceptHeader -MediaType $MediaType -AsJson) 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubGistCommentAdditionalProperties) @@ -142,12 +133,6 @@ filter Remove-GitHubGistComment 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.Gist GitHub.GistComment @@ -199,9 +184,7 @@ filter Remove-GitHubGistComment [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -224,7 +207,6 @@ filter Remove-GitHubGistComment 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params @@ -251,12 +233,6 @@ filter New-GitHubGistComment 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.Gist GitHub.GistComment @@ -291,9 +267,7 @@ filter New-GitHubGistComment [ValidateNotNullOrEmpty()] [string] $Body, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -316,7 +290,6 @@ filter New-GitHubGistComment 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubGistCommentAdditionalProperties) @@ -346,12 +319,6 @@ filter Set-GitHubGistComment 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.Gist GitHub.GistComment @@ -395,9 +362,7 @@ filter Set-GitHubGistComment [ValidateNotNullOrEmpty()] [string] $Body, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -420,7 +385,6 @@ filter Set-GitHubGistComment 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubGistCommentAdditionalProperties) diff --git a/GitHubGists.ps1 b/GitHubGists.ps1 index 11140ba8..f44368e2 100644 --- a/GitHubGists.ps1 +++ b/GitHubGists.ps1 @@ -59,12 +59,6 @@ filter Get-GitHubGist 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.Gist GitHub.GistComment @@ -156,9 +150,7 @@ filter Get-GitHubGist [Parameter(ParameterSetName='Public')] [DateTime] $Since, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -270,7 +262,6 @@ filter Get-GitHubGist 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = (Invoke-GHRestMethodMultipleResult @params | @@ -446,12 +437,6 @@ filter Remove-GitHubGist 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.Gist GitHub.GistComment @@ -492,9 +477,7 @@ filter Remove-GitHubGist [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -517,7 +500,6 @@ filter Remove-GitHubGist 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params @@ -541,12 +523,6 @@ filter Copy-GitHubGist 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.Gist GitHub.GistComment @@ -582,9 +558,7 @@ filter Copy-GitHubGist [ValidateNotNullOrEmpty()] [string] $Gist, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -602,7 +576,6 @@ filter Copy-GitHubGist 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | @@ -631,12 +604,6 @@ filter Set-GitHubGistStar 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.Gist GitHub.GistComment @@ -674,9 +641,7 @@ filter Set-GitHubGistStar [switch] $Star, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -711,12 +676,6 @@ filter Add-GitHubGistStar 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.Gist GitHub.GistComment @@ -748,9 +707,7 @@ filter Add-GitHubGistStar [ValidateNotNullOrEmpty()] [string] $Gist, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -768,7 +725,6 @@ filter Add-GitHubGistStar 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params @@ -792,12 +748,6 @@ filter Remove-GitHubGistStar 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.Gist GitHub.GistComment @@ -829,9 +779,7 @@ filter Remove-GitHubGistStar [ValidateNotNullOrEmpty()] [string] $Gist, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -849,7 +797,6 @@ filter Remove-GitHubGistStar 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params @@ -875,12 +822,6 @@ filter Test-GitHubGistStar 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.Gist GitHub.GistComment @@ -908,9 +849,7 @@ filter Test-GitHubGistStar [ValidateNotNullOrEmpty()] [string] $Gist, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -924,7 +863,6 @@ filter Test-GitHubGistStar 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties 'ExtendedResult' = $true - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } try @@ -970,12 +908,6 @@ filter New-GitHubGist 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 String - Filename(s) of file(s) that should be the content of the gist. @@ -1031,9 +963,7 @@ filter New-GitHubGist [switch] $Public, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) begin @@ -1104,7 +1034,6 @@ filter New-GitHubGist 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | @@ -1150,12 +1079,6 @@ filter Set-GitHubGist 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.Gist GitHub.GistComment @@ -1213,9 +1136,7 @@ filter Set-GitHubGist [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1306,7 +1227,6 @@ filter Set-GitHubGist 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } try @@ -1359,12 +1279,6 @@ function Set-GitHubGistFile 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.Gist GitHub.GistComment @@ -1431,9 +1345,7 @@ function Set-GitHubGistFile [ValidateNotNullOrEmpty()] [string] $Content, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) begin @@ -1472,7 +1384,6 @@ function Set-GitHubGistFile 'Gist' = $Gist 'Update' = $files 'AccessToken' = $AccessToken - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Set-GitHubGist @params) @@ -1505,12 +1416,6 @@ function Remove-GitHubGistFile 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.Gist GitHub.GistComment @@ -1560,9 +1465,7 @@ function Remove-GitHubGistFile [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) begin @@ -1589,7 +1492,6 @@ function Remove-GitHubGistFile 'Force' = $Force 'Confirm' = ($Confirm -eq $true) 'AccessToken' = $AccessToken - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Set-GitHubGist @params) @@ -1622,12 +1524,6 @@ filter Rename-GitHubGistFile 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.Gist GitHub.GistComment @@ -1669,9 +1565,7 @@ filter Rename-GitHubGistFile [ValidateNotNullOrEmpty()] [string] $NewName, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1681,7 +1575,6 @@ filter Rename-GitHubGistFile 'Gist' = $Gist 'Update' = @{$FileName = @{ 'fileName' = $NewName }} 'AccessToken' = $AccessToken - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Set-GitHubGist @params) diff --git a/GitHubIssueComments.ps1 b/GitHubIssueComments.ps1 index bb7fc994..f3fc5a91 100644 --- a/GitHubIssueComments.ps1 +++ b/GitHubIssueComments.ps1 @@ -61,12 +61,6 @@ filter Get-GitHubIssueComment 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 @@ -202,9 +196,7 @@ filter Get-GitHubIssueComment [ValidateSet('Raw', 'Text', 'Html', 'Full')] [string] $MediaType ='Raw', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -279,7 +271,6 @@ filter Get-GitHubIssueComment 'AcceptHeader' = (Get-MediaAcceptHeader -MediaType $MediaType -AsJson -AcceptHeader $squirrelGirlAcceptHeader) 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubIssueCommentAdditionalProperties) @@ -324,12 +315,6 @@ filter New-GitHubIssueComment 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 @@ -361,7 +346,7 @@ filter New-GitHubIssueComment DefaultParameterSetName='Elements')] [Alias('New-GitHubComment')] # Aliased to avoid a breaking change after v0.14.0 [OutputType({$script:GitHubIssueCommentTypeName})] - [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, @@ -388,9 +373,7 @@ filter New-GitHubIssueComment [ValidateSet('Raw', 'Text', 'Html', 'Full')] [string] $MediaType ='Raw', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -423,7 +406,6 @@ filter New-GitHubIssueComment 'AcceptHeader' = (Get-MediaAcceptHeader -MediaType $MediaType -AsJson -AcceptHeader $squirrelGirlAcceptHeader) 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubIssueCommentAdditionalProperties) @@ -473,12 +455,6 @@ filter Set-GitHubIssueComment 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 @@ -510,7 +486,7 @@ filter Set-GitHubIssueComment DefaultParameterSetName='Elements')] [Alias('Set-GitHubComment')] # Aliased to avoid a breaking change after v0.14.0 [OutputType({$script:GitHubIssueCommentTypeName})] - [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, @@ -537,9 +513,7 @@ filter Set-GitHubIssueComment [ValidateSet('Raw', 'Text', 'Html', 'Full')] [string] $MediaType ='Raw', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -572,7 +546,6 @@ filter Set-GitHubIssueComment 'AcceptHeader' = (Get-MediaAcceptHeader -MediaType $MediaType -AsJson -AcceptHeader $squirrelGirlAcceptHeader) 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubIssueCommentAdditionalProperties) @@ -609,12 +582,6 @@ filter Remove-GitHubIssueComment 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 @@ -656,7 +623,7 @@ filter Remove-GitHubIssueComment [Alias('Delete-GitHubComment')] [Alias('Delete-GitHubIssueComment')] [Alias('Remove-GitHubComment')] # Aliased to avoid a breaking change after v0.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, @@ -679,9 +646,7 @@ filter Remove-GitHubIssueComment [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -713,7 +678,6 @@ filter Remove-GitHubIssueComment 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params diff --git a/GitHubIssues.ps1 b/GitHubIssues.ps1 index 33639e88..1be486e4 100644 --- a/GitHubIssues.ps1 +++ b/GitHubIssues.ps1 @@ -110,12 +110,6 @@ filter Get-GitHubIssue 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 @@ -211,9 +205,7 @@ filter Get-GitHubIssue [ValidateSet('Raw', 'Text', 'Html', 'Full')] [string] $MediaType ='Raw', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -361,7 +353,6 @@ filter Get-GitHubIssue 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } try @@ -412,12 +403,6 @@ filter Get-GitHubIssueTimeline 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 @@ -443,7 +428,7 @@ filter Get-GitHubIssueTimeline #> [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubEventTypeName})] - [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, @@ -464,9 +449,7 @@ filter Get-GitHubIssueTimeline [Alias('IssueNumber')] [int64] $Issue, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -487,7 +470,6 @@ filter Get-GitHubIssueTimeline 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubEventAdditionalProperties) @@ -549,12 +531,6 @@ filter New-GitHubIssue 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 @@ -613,9 +589,7 @@ filter New-GitHubIssue [ValidateSet('Raw', 'Text', 'Html', 'Full')] [string] $MediaType ='Raw', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -652,7 +626,6 @@ filter New-GitHubIssue 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubIssueAdditionalProperties) @@ -723,12 +696,6 @@ filter Set-GitHubIssue 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 @@ -793,9 +760,7 @@ filter Set-GitHubIssue [ValidateSet('Raw', 'Text', 'Html', 'Full')] [string] $MediaType ='Raw', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -839,7 +804,6 @@ filter Set-GitHubIssue 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubIssueAdditionalProperties) @@ -879,12 +843,6 @@ filter Lock-GitHubIssue 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 @@ -931,9 +889,7 @@ filter Lock-GitHubIssue [ValidateSet('OffTopic', 'TooHeated', 'Resolved', 'Spam')] [string] $Reason, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -978,7 +934,6 @@ filter Lock-GitHubIssue 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params @@ -1015,12 +970,6 @@ filter Unlock-GitHubIssue 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 @@ -1044,7 +993,7 @@ filter Unlock-GitHubIssue [CmdletBinding( SupportsShouldProcess, DefaultParameterSetName='Elements')] - [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, @@ -1065,9 +1014,7 @@ filter Unlock-GitHubIssue [Alias('IssueNumber')] [int64] $Issue, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1094,7 +1041,6 @@ filter Unlock-GitHubIssue 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params diff --git a/GitHubLabels.ps1 b/GitHubLabels.ps1 index fa000f87..2cd52a21 100644 --- a/GitHubLabels.ps1 +++ b/GitHubLabels.ps1 @@ -45,12 +45,6 @@ filter Get-GitHubLabel 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 @@ -119,9 +113,7 @@ filter Get-GitHubLabel [Parameter(ValueFromPipelineByPropertyName)] [int64] $MilestoneNumber, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -186,7 +178,6 @@ filter Get-GitHubLabel 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubLabelAdditionalProperties) @@ -231,12 +222,6 @@ filter New-GitHubLabel 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 @@ -266,7 +251,7 @@ filter New-GitHubLabel SupportsShouldProcess, DefaultParameterSetName='Elements')] [OutputType({$script:GitHubLabelTypeName})] - [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, @@ -294,9 +279,7 @@ filter New-GitHubLabel [string] $Description, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -337,7 +320,6 @@ filter New-GitHubLabel 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubLabelAdditionalProperties) @@ -378,12 +360,6 @@ filter Remove-GitHubLabel 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 @@ -429,8 +405,8 @@ filter Remove-GitHubLabel SupportsShouldProcess, DefaultParameterSetName='Elements', ConfirmImpact="High")] - [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.")] [Alias('Delete-GitHubLabel')] + [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, @@ -455,9 +431,7 @@ filter Remove-GitHubLabel [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -489,7 +463,6 @@ filter Remove-GitHubLabel 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params @@ -539,12 +512,6 @@ filter Set-GitHubLabel 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 @@ -605,9 +572,7 @@ filter Set-GitHubLabel [string] $Description, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -647,7 +612,6 @@ filter Set-GitHubLabel 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubLabelAdditionalProperties) @@ -691,12 +655,6 @@ filter Initialize-GitHubLabel 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 @@ -731,7 +689,7 @@ filter Initialize-GitHubLabel [CmdletBinding( SupportsShouldProcess, DefaultParameterSetName='Elements')] - [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, @@ -749,9 +707,7 @@ filter Initialize-GitHubLabel [Parameter(ValueFromPipelineByPropertyName)] [object[]] $Label, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -765,13 +721,10 @@ filter Initialize-GitHubLabel $OwnerName = $elements.ownerName $RepositoryName = $elements.repositoryName - $NoStatus = Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus - $commonParams = @{ 'OwnerName' = $OwnerName 'RepositoryName' = $RepositoryName 'AccessToken' = $AccessToken - 'NoStatus' = $NoStatus } $labelNames = $Label.name @@ -859,12 +812,6 @@ function Add-GitHubIssueLabel 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 @@ -901,7 +848,7 @@ function Add-GitHubIssueLabel SupportsShouldProcess, DefaultParameterSetName='Elements')] [OutputType({$script:GitHubLabelTypeName})] - [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( Mandatory, @@ -934,9 +881,7 @@ function Add-GitHubIssueLabel [ValidateNotNullOrEmpty()] [string[]] $Label, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) begin @@ -984,7 +929,6 @@ function Add-GitHubIssueLabel 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubLabelAdditionalProperties) @@ -1025,12 +969,6 @@ function Set-GitHubIssueLabel 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 @@ -1091,7 +1029,7 @@ function Set-GitHubIssueLabel SupportsShouldProcess, DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubLabelTypeName})] - [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, @@ -1118,9 +1056,7 @@ function Set-GitHubIssueLabel [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) begin @@ -1181,7 +1117,6 @@ function Set-GitHubIssueLabel 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubLabelAdditionalProperties) @@ -1224,12 +1159,6 @@ filter Remove-GitHubIssueLabel 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 @@ -1300,9 +1229,7 @@ filter Remove-GitHubIssueLabel [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1344,7 +1271,6 @@ filter Remove-GitHubIssueLabel 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params diff --git a/GitHubMilestones.ps1 b/GitHubMilestones.ps1 index c42ea0c8..0f2fd516 100644 --- a/GitHubMilestones.ps1 +++ b/GitHubMilestones.ps1 @@ -49,12 +49,6 @@ filter Get-GitHubMilestone 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 @@ -140,9 +134,7 @@ filter Get-GitHubMilestone [ValidateSet('Ascending', 'Descending')] [string] $Direction, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -205,7 +197,6 @@ filter Get-GitHubMilestone 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubMilestoneAdditionalProperties) @@ -250,12 +241,6 @@ filter New-GitHubMilestone 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 @@ -331,9 +316,7 @@ filter New-GitHubMilestone [DateTime] $DueOn, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -389,7 +372,6 @@ filter New-GitHubMilestone 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubMilestoneAdditionalProperties) @@ -437,12 +419,6 @@ filter Set-GitHubMilestone 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 @@ -527,9 +503,7 @@ filter Set-GitHubMilestone [DateTime] $DueOn, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -586,7 +560,6 @@ filter Set-GitHubMilestone 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubMilestoneAdditionalProperties) @@ -623,12 +596,6 @@ filter Remove-GitHubMilestone 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 @@ -668,7 +635,7 @@ filter Remove-GitHubMilestone DefaultParameterSetName='Elements', ConfirmImpact="High")] [Alias('Delete-GitHubMilestone')] - [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( Mandatory, @@ -700,9 +667,7 @@ filter Remove-GitHubMilestone [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -734,7 +699,6 @@ filter Remove-GitHubMilestone 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params diff --git a/GitHubMiscellaneous.ps1 b/GitHubMiscellaneous.ps1 index 07cda624..5890a00b 100644 --- a/GitHubMiscellaneous.ps1 +++ b/GitHubMiscellaneous.ps1 @@ -30,12 +30,6 @@ function Get-GitHubRateLimit 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. - .OUTPUTS GitHub.RateLimit Limits returned are _per hour_. @@ -64,11 +58,8 @@ function Get-GitHubRateLimit #> [CmdletBinding()] [OutputType({$script:GitHubRateLimitTypeName})] - [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.")] param( - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -79,7 +70,6 @@ function Get-GitHubRateLimit 'Description' = "Getting your API rate limit" 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params @@ -117,12 +107,6 @@ function ConvertFrom-GitHubMarkdown 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 [String] @@ -136,7 +120,6 @@ function ConvertFrom-GitHubMarkdown #> [CmdletBinding()] [OutputType([String])] - [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.")] param( [Parameter( Mandatory, @@ -152,9 +135,7 @@ function ConvertFrom-GitHubMarkdown [string] $Context, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) begin @@ -188,7 +169,6 @@ function ConvertFrom-GitHubMarkdown 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } Write-Output -InputObject (Invoke-GHRestMethod @params) @@ -227,12 +207,6 @@ filter Get-GitHubLicense 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 [String] GitHub.Branch @@ -298,9 +272,7 @@ filter Get-GitHubLicense [Alias('LicenseKey')] [string] $Key, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -344,7 +316,6 @@ filter Get-GitHubLicense 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params @@ -393,12 +364,6 @@ function Get-GitHubEmoji 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. - .OUTPUTS GitHub.Emoji @@ -407,11 +372,8 @@ function Get-GitHubEmoji #> [CmdletBinding()] [OutputType({$script:GitHubEmojiTypeName})] - [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.")] param( - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -422,7 +384,6 @@ function Get-GitHubEmoji 'Description' = "Getting all GitHub emojis" 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params @@ -462,12 +423,6 @@ filter Get-GitHubCodeOfConduct 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 [String] GitHub.Branch @@ -534,9 +489,7 @@ filter Get-GitHubCodeOfConduct [Alias('CodeOfConductKey')] [string] $Key, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -581,7 +534,6 @@ filter Get-GitHubCodeOfConduct 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params @@ -619,12 +571,6 @@ filter Get-GitHubGitIgnore 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 [String] @@ -652,9 +598,7 @@ filter Get-GitHubGitIgnore [Parameter(ParameterSetName='Individual')] [switch] $RawContent, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -677,7 +621,6 @@ filter Get-GitHubGitIgnore 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } if ($RawContent) diff --git a/GitHubOrganizations.ps1 b/GitHubOrganizations.ps1 index 2a02a925..dfa48074 100644 --- a/GitHubOrganizations.ps1 +++ b/GitHubOrganizations.ps1 @@ -25,12 +25,6 @@ filter Get-GitHubOrganizationMember 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 [String] @@ -43,7 +37,6 @@ filter Get-GitHubOrganizationMember #> [CmdletBinding()] [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.")] param ( [Parameter( @@ -53,9 +46,7 @@ filter Get-GitHubOrganizationMember [ValidateNotNullOrEmpty()] [String] $OrganizationName, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -70,7 +61,6 @@ filter Get-GitHubOrganizationMember 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubUserAdditionalProperties) @@ -97,12 +87,6 @@ filter Test-GitHubOrganizationMember 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 [String] @@ -114,7 +98,6 @@ filter Test-GitHubOrganizationMember #> [CmdletBinding()] [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.")] param ( [Parameter( @@ -129,9 +112,7 @@ filter Test-GitHubOrganizationMember [ValidateNotNullOrEmpty()] [String] $UserName, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -148,7 +129,6 @@ filter Test-GitHubOrganizationMember 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } try diff --git a/GitHubProjectCards.ps1 b/GitHubProjectCards.ps1 index d91ff88a..0625686f 100644 --- a/GitHubProjectCards.ps1 +++ b/GitHubProjectCards.ps1 @@ -26,12 +26,6 @@ filter Get-GitHubProjectCard 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 command line 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.ProjectCard GitHub.ProjectColumn @@ -80,9 +74,7 @@ filter Get-GitHubProjectCard [Alias('ArchivedState')] [string] $State = 'NotArchived', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -123,7 +115,6 @@ filter Get-GitHubProjectCard 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } @@ -156,12 +147,6 @@ filter New-GitHubProjectCard 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 command line 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.IssueComment GitHub.Issue @@ -191,7 +176,6 @@ filter New-GitHubProjectCard SupportsShouldProcess, DefaultParameterSetName = 'Note')] [OutputType({$script:GitHubProjectCardTypeName})] - [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.")] param( [Parameter( Mandatory, @@ -217,9 +201,7 @@ filter New-GitHubProjectCard ParameterSetName = 'PullRequest')] [int64] $PullRequestId, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -269,7 +251,6 @@ filter New-GitHubProjectCard 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } @@ -301,12 +282,6 @@ filter Set-GitHubProjectCard 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 command line 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.ProjectCard @@ -348,9 +323,7 @@ filter Set-GitHubProjectCard [Parameter(ParameterSetName = 'Restore')] [switch] $Restore, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -393,7 +366,6 @@ filter Set-GitHubProjectCard 'Method' = 'Patch' 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } @@ -418,12 +390,6 @@ filter Remove-GitHubProjectCard 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 command line 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.ProjectCard @@ -446,7 +412,6 @@ filter Remove-GitHubProjectCard SupportsShouldProcess, ConfirmImpact = 'High')] [Alias('Delete-GitHubProjectCard')] - [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.")] param( [Parameter( Mandatory, @@ -456,9 +421,7 @@ filter Remove-GitHubProjectCard [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -485,7 +448,6 @@ filter Remove-GitHubProjectCard 'Method' = 'Delete' 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } @@ -519,12 +481,6 @@ filter Move-GitHubProjectCard 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 command line 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.ProjectCard GitHub.ProjectColumn @@ -569,9 +525,7 @@ filter Move-GitHubProjectCard [Alias('ColumnId')] [int64] $Column, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -623,7 +577,6 @@ filter Move-GitHubProjectCard 'Method' = 'Post' 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } diff --git a/GitHubProjectColumns.ps1 b/GitHubProjectColumns.ps1 index 8c471368..8194751d 100644 --- a/GitHubProjectColumns.ps1 +++ b/GitHubProjectColumns.ps1 @@ -25,12 +25,6 @@ filter Get-GitHubProjectColumn 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 command line 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.Project GitHub.ProjectCard @@ -51,7 +45,6 @@ filter Get-GitHubProjectColumn #> [CmdletBinding(DefaultParameterSetName = 'Column')] [OutputType({$script:GitHubProjectColumnTypeName})] - [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.")] param( [Parameter( Mandatory, @@ -68,9 +61,7 @@ filter Get-GitHubProjectColumn [Alias('ColumnId')] [int64] $Column, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -101,7 +92,6 @@ filter Get-GitHubProjectColumn 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } @@ -126,12 +116,6 @@ filter New-GitHubProjectColumn 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 command line 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 [String] GitHub.Project @@ -148,7 +132,6 @@ filter New-GitHubProjectColumn #> [CmdletBinding(SupportsShouldProcess)] [OutputType({$script:GitHubProjectColumnTypeName})] - [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.")] param( [Parameter( @@ -163,9 +146,7 @@ filter New-GitHubProjectColumn [Alias('Name')] [string] $ColumnName, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -193,7 +174,6 @@ filter New-GitHubProjectColumn 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } @@ -218,12 +198,6 @@ filter Set-GitHubProjectColumn 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 command line 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.ProjectCard GitHub.ProjectColumn @@ -238,7 +212,6 @@ filter Set-GitHubProjectColumn #> [CmdletBinding(SupportsShouldProcess)] [OutputType({$script:GitHubProjectColumnTypeName})] - [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.")] param( [Parameter( Mandatory, @@ -250,9 +223,7 @@ filter Set-GitHubProjectColumn [Alias('Name')] [string] $ColumnName, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -279,7 +250,6 @@ filter Set-GitHubProjectColumn 'Method' = 'Patch' 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } @@ -304,12 +274,6 @@ filter Remove-GitHubProjectColumn 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 command line 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.ProjectCard GitHub.ProjectColumn @@ -333,7 +297,6 @@ filter Remove-GitHubProjectColumn SupportsShouldProcess, ConfirmImpact = 'High')] [Alias('Delete-GitHubProjectColumn')] - [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.")] param( [Parameter( Mandatory, @@ -343,9 +306,7 @@ filter Remove-GitHubProjectColumn [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -372,7 +333,6 @@ filter Remove-GitHubProjectColumn 'Method' = 'Delete' 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } @@ -404,12 +364,6 @@ filter Move-GitHubProjectColumn 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 command line 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.ProjectCard GitHub.ProjectColumn @@ -430,7 +384,6 @@ filter Move-GitHubProjectColumn Moves the project column with ID 999999 to the position after column with ID 888888. #> [CmdletBinding(SupportsShouldProcess)] - [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.")] param( [Parameter( Mandatory, @@ -444,9 +397,7 @@ filter Move-GitHubProjectColumn [int64] $After, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -492,7 +443,6 @@ filter Move-GitHubProjectColumn 'Method' = 'Post' 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } diff --git a/GitHubProjects.ps1 b/GitHubProjects.ps1 index ee761fd5..78749d94 100644 --- a/GitHubProjects.ps1 +++ b/GitHubProjects.ps1 @@ -44,12 +44,6 @@ filter Get-GitHubProject 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 command line 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 @@ -149,9 +143,7 @@ filter Get-GitHubProject [ValidateSet('Open', 'Closed', 'All')] [string] $State, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -210,7 +202,6 @@ filter Get-GitHubProject 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } @@ -255,12 +246,6 @@ filter New-GitHubProject 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 command line 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 @@ -342,9 +327,7 @@ filter New-GitHubProject [string] $Description, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -403,7 +386,6 @@ filter New-GitHubProject 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } @@ -441,12 +423,6 @@ filter Set-GitHubProject 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 command line 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 @@ -498,9 +474,7 @@ filter Set-GitHubProject [switch] $Private, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -549,7 +523,6 @@ filter Set-GitHubProject 'Method' = 'Patch' 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } @@ -574,12 +547,6 @@ filter Remove-GitHubProject 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 command line 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 @@ -622,7 +589,6 @@ filter Remove-GitHubProject SupportsShouldProcess, ConfirmImpact = 'High')] [Alias('Delete-GitHubProject')] - [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.")] param( [Parameter( Mandatory, @@ -632,9 +598,7 @@ filter Remove-GitHubProject [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -661,7 +625,6 @@ filter Remove-GitHubProject 'Method' = 'Delete' 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) 'AcceptHeader' = $script:inertiaAcceptHeader } diff --git a/GitHubPullRequests.ps1 b/GitHubPullRequests.ps1 index aa57f53f..e8ef9832 100644 --- a/GitHubPullRequests.ps1 +++ b/GitHubPullRequests.ps1 @@ -58,12 +58,6 @@ filter Get-GitHubPullRequest 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 @@ -124,9 +118,7 @@ filter Get-GitHubPullRequest [ValidateSet('Ascending', 'Descending')] [string] $Direction = 'Descending', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -184,7 +176,6 @@ filter Get-GitHubPullRequest 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubPullRequestAdditionalProperties) @@ -252,12 +243,6 @@ filter New-GitHubPullRequest 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 @@ -356,9 +341,7 @@ filter New-GitHubPullRequest [switch] $Draft, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -437,7 +420,6 @@ filter New-GitHubPullRequest 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } if ($acceptHeader) diff --git a/GitHubReactions.ps1 b/GitHubReactions.ps1 index 1c4e74d2..a5cdaeb8 100644 --- a/GitHubReactions.ps1 +++ b/GitHubReactions.ps1 @@ -47,12 +47,6 @@ filter Get-GitHubReaction 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 @@ -100,7 +94,6 @@ filter Get-GitHubReaction Currently, issue comments, pull request comments and commit comments are not supported. #> [CmdletBinding(DefaultParameterSetName='ElementsIssue')] - [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.")] param( [Parameter( Mandatory, @@ -154,9 +147,7 @@ filter Get-GitHubReaction [ValidateSet('+1', '-1', 'Laugh', 'Confused', 'Heart', 'Hooray', 'Rocket', 'Eyes')] [string] $ReactionType, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -205,7 +196,6 @@ filter Get-GitHubReaction 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethodMultipleResult @params @@ -250,12 +240,6 @@ filter Set-GitHubReaction 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 @@ -292,7 +276,7 @@ filter Set-GitHubReaction [CmdletBinding( SupportsShouldProcess, DefaultParameterSetName='ElementsIssue')] - [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( Mandatory, @@ -347,9 +331,7 @@ filter Set-GitHubReaction [Parameter(Mandatory)] [string] $ReactionType, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -402,7 +384,6 @@ filter Set-GitHubReaction 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params @@ -450,12 +431,6 @@ filter Remove-GitHubReaction 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 @@ -501,7 +476,7 @@ filter Remove-GitHubReaction DefaultParameterSetName='ElementsIssue', ConfirmImpact='High')] [Alias('Delete-GitHubReaction')] - [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( Mandatory, @@ -561,9 +536,7 @@ filter Remove-GitHubReaction [Parameter()] [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -613,7 +586,6 @@ filter Remove-GitHubReaction 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params diff --git a/GitHubReleases.ps1 b/GitHubReleases.ps1 index 0faf57c9..b25eee41 100644 --- a/GitHubReleases.ps1 +++ b/GitHubReleases.ps1 @@ -48,12 +48,6 @@ filter Get-GitHubRelease 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 @@ -169,9 +163,7 @@ filter Get-GitHubRelease ParameterSetName='Uri-Tag')] [string] $Tag, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -218,7 +210,6 @@ filter Get-GitHubRelease 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubReleaseAdditionalProperties) @@ -273,12 +264,6 @@ filter New-GitHubRelease 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 @@ -345,9 +330,7 @@ filter New-GitHubRelease [switch] $PreRelease, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -384,7 +367,6 @@ filter New-GitHubRelease 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } if (-not $PSCmdlet.ShouldProcess($Tag, "Create release for $RepositoryName at tag")) @@ -446,12 +428,6 @@ filter Set-GitHubRelease 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 @@ -519,9 +495,7 @@ filter Set-GitHubRelease [switch] $PreRelease, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -557,7 +531,6 @@ filter Set-GitHubRelease 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } if (-not $PSCmdlet.ShouldProcess($Release, "Update GitHub Release")) @@ -602,12 +575,6 @@ filter Remove-GitHubRelease 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 @@ -639,8 +606,8 @@ filter Remove-GitHubRelease SupportsShouldProcess, PositionalBinding = $false, ConfirmImpact='High')] - [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.")] [Alias('Delete-GitHubRelease')] + [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, @@ -665,9 +632,7 @@ filter Remove-GitHubRelease [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -688,7 +653,6 @@ filter Remove-GitHubRelease 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } if ($Force -and (-not $Confirm)) @@ -744,12 +708,6 @@ filter Get-GitHubReleaseAsset 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 @@ -782,7 +740,7 @@ filter Get-GitHubReleaseAsset #> [CmdletBinding(PositionalBinding = $false)] [OutputType({$script:GitHubReleaseAssetTypeName})] - [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-List')] [Parameter(ParameterSetName='Elements-Info')] @@ -862,9 +820,7 @@ filter Get-GitHubReleaseAsset [Parameter(ParameterSetName='Uri-Download')] [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -911,7 +867,6 @@ filter Get-GitHubReleaseAsset 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params @@ -972,12 +927,6 @@ filter New-GitHubReleaseAsset 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 @@ -1020,7 +969,6 @@ filter New-GitHubReleaseAsset SupportsShouldProcess, PositionalBinding = $false)] [OutputType({$script:GitHubReleaseAssetTypeName})] - [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.")] param( [Parameter(ParameterSetName='Elements')] [string] $OwnerName, @@ -1074,9 +1022,7 @@ filter New-GitHubReleaseAsset [string] $ContentType, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1102,7 +1048,6 @@ filter New-GitHubReleaseAsset 'RepositoryName' = $RepositoryName 'Release' = $Release 'AccessToken' = $AccessToken - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $releaseInfo = Get-GitHubRelease @params @@ -1141,7 +1086,6 @@ filter New-GitHubReleaseAsset 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubReleaseAssetAdditionalProperties) @@ -1184,12 +1128,6 @@ filter Set-GitHubReleaseAsset 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 @@ -1221,7 +1159,6 @@ filter Set-GitHubReleaseAsset SupportsShouldProcess, PositionalBinding = $false)] [OutputType({$script:GitHubReleaseAssetTypeName})] - [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.")] param( [Parameter(ParameterSetName='Elements')] [string] $OwnerName, @@ -1248,9 +1185,7 @@ filter Set-GitHubReleaseAsset [string] $Label, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1283,7 +1218,6 @@ filter Set-GitHubReleaseAsset 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubReleaseAssetAdditionalProperties) @@ -1323,12 +1257,6 @@ filter Remove-GitHubReleaseAsset 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 @@ -1357,8 +1285,8 @@ filter Remove-GitHubReleaseAsset SupportsShouldProcess, PositionalBinding = $false, ConfirmImpact='High')] - [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.")] [Alias('Delete-GitHubReleaseAsset')] + [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, @@ -1383,9 +1311,7 @@ filter Remove-GitHubReleaseAsset [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1406,7 +1332,6 @@ filter Remove-GitHubReleaseAsset 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } if ($Force -and (-not $Confirm)) diff --git a/GitHubRepositories.ps1 b/GitHubRepositories.ps1 index cee93245..b2911bcd 100644 --- a/GitHubRepositories.ps1 +++ b/GitHubRepositories.ps1 @@ -91,12 +91,6 @@ filter New-GitHubRepository 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 @@ -168,9 +162,7 @@ filter New-GitHubRepository [switch] $IsTemplate, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -228,7 +220,6 @@ filter New-GitHubRepository 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubRepositoryAdditionalProperties) @@ -277,12 +268,6 @@ filter New-GitHubRepositoryFromTemplate 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 @@ -357,9 +342,7 @@ filter New-GitHubRepositoryFromTemplate [switch] $Private, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -401,8 +384,6 @@ filter New-GitHubRepositoryFromTemplate 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue ` - -BoundParameters $PSBoundParameters -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubRepositoryAdditionalProperties) @@ -439,12 +420,6 @@ filter Remove-GitHubRepository 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 @@ -489,7 +464,7 @@ filter Remove-GitHubRepository DefaultParameterSetName='Elements', ConfirmImpact="High")] [Alias('Delete-GitHubRepository')] - [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, @@ -506,9 +481,7 @@ filter Remove-GitHubRepository [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -539,7 +512,6 @@ filter Remove-GitHubRepository 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return Invoke-GHRestMethod @params @@ -609,12 +581,6 @@ filter Get-GitHubRepository 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 @@ -672,8 +638,6 @@ filter Get-GitHubRepository #> [CmdletBinding(DefaultParameterSetName = 'AuthenticatedUser')] [OutputType({$script:GitHubRepositoryTypeName})] - [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.")] param( [Parameter( ValueFromPipelineByPropertyName, @@ -728,9 +692,7 @@ filter Get-GitHubRepository [Parameter(ParameterSetName='PublicRepos')] [int64] $Since, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -891,7 +853,6 @@ filter Get-GitHubRepository 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubRepositoryAdditionalProperties) @@ -931,12 +892,6 @@ filter Rename-GitHubRepository 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 @@ -1022,9 +977,7 @@ filter Rename-GitHubRepository [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) # This method was created by mistake and is now retained to avoid a breaking change. @@ -1113,12 +1066,6 @@ filter Set-GitHubRepository 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 @@ -1206,9 +1153,7 @@ filter Set-GitHubRepository [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1265,7 +1210,6 @@ filter Set-GitHubRepository 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubRepositoryAdditionalProperties) @@ -1299,12 +1243,6 @@ filter Get-GitHubRepositoryTopic 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 @@ -1333,7 +1271,7 @@ filter Get-GitHubRepositoryTopic #> [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubRepositoryTopicTypeName})] - [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, @@ -1348,9 +1286,7 @@ filter Get-GitHubRepositoryTopic [Alias('RepositoryUrl')] [string] $Uri, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1372,7 +1308,6 @@ filter Get-GitHubRepositoryTopic 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | @@ -1413,12 +1348,6 @@ function Set-GitHubRepositoryTopic 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 @@ -1498,9 +1427,7 @@ function Set-GitHubRepositoryTopic ParameterSetName='UriClear')] [switch] $Clear, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) begin @@ -1559,7 +1486,6 @@ function Set-GitHubRepositoryTopic 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | @@ -1608,12 +1534,6 @@ filter Get-GitHubRepositoryContributor 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 @@ -1648,7 +1568,7 @@ filter Get-GitHubRepositoryContributor [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubRepositoryContributorTypeName})] [OutputType({$script:GitHubRepositoryContributorStatisticsTypeName})] - [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, @@ -1667,9 +1587,7 @@ filter Get-GitHubRepositoryContributor [switch] $IncludeStatistics, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1697,7 +1615,6 @@ filter Get-GitHubRepositoryContributor 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $results = Invoke-GHRestMethodMultipleResult @params @@ -1759,12 +1676,6 @@ filter Get-GitHubRepositoryCollaborator regardless of organization membership status. Outside: All outside collaborators of an organization-owned repository. - .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 @@ -1797,7 +1708,7 @@ filter Get-GitHubRepositoryCollaborator #> [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubRepositoryCollaboratorTypeName})] - [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, @@ -1815,9 +1726,7 @@ filter Get-GitHubRepositoryCollaborator [ValidateSet('All', 'Direct', 'Outside')] [string] $Affiliation = 'All', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1841,7 +1750,6 @@ filter Get-GitHubRepositoryCollaborator 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | @@ -1876,12 +1784,6 @@ filter Get-GitHubRepositoryLanguage 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 @@ -1911,7 +1813,7 @@ filter Get-GitHubRepositoryLanguage #> [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubRepositoryLanguageTypeName})] - [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, @@ -1926,9 +1828,7 @@ filter Get-GitHubRepositoryLanguage [Alias('RepositoryUrl')] [string] $Uri, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -1948,7 +1848,6 @@ filter Get-GitHubRepositoryLanguage 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | @@ -1983,12 +1882,6 @@ filter Get-GitHubRepositoryTag 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 @@ -2017,7 +1910,7 @@ filter Get-GitHubRepositoryTag #> [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubRepositoryTagTypeName})] - [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, @@ -2032,9 +1925,7 @@ filter Get-GitHubRepositoryTag [Alias('RepositoryUrl')] [string] $Uri, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -2054,7 +1945,6 @@ filter Get-GitHubRepositoryTag 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | @@ -2096,12 +1986,6 @@ filter Move-GitHubRepositoryOwnership 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 @@ -2130,7 +2014,7 @@ filter Move-GitHubRepositoryOwnership DefaultParameterSetName='Elements')] [OutputType({$script:GitHubRepositoryTypeName})] [Alias('Transfer-GitHubRepositoryOwnership')] - [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, @@ -2151,9 +2035,7 @@ filter Move-GitHubRepositoryOwnership [int64[]] $TeamId, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -2188,7 +2070,6 @@ filter Move-GitHubRepositoryOwnership 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubRepositoryAdditionalProperties) @@ -2222,12 +2103,6 @@ filter Test-GitHubRepositoryVulnerabilityAlert 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 @@ -2277,9 +2152,7 @@ filter Test-GitHubRepositoryVulnerabilityAlert [Alias('RepositoryUrl')] [string] $Uri, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -2301,8 +2174,6 @@ filter Test-GitHubRepositoryVulnerabilityAlert AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters ` - -Name NoStatus -ConfigValueName DefaultNoStatus) } try @@ -2369,12 +2240,6 @@ filter Enable-GitHubRepositoryVulnerabilityAlert 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 @@ -2426,9 +2291,7 @@ filter Enable-GitHubRepositoryVulnerabilityAlert [Alias('RepositoryUrl')] [string] $Uri, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -2455,8 +2318,6 @@ filter Enable-GitHubRepositoryVulnerabilityAlert AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters ` - -Name NoStatus -ConfigValueName DefaultNoStatus) } Invoke-GHRestMethod @params | Out-Null @@ -2490,12 +2351,6 @@ filter Disable-GitHubRepositoryVulnerabilityAlert 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 @@ -2546,9 +2401,7 @@ filter Disable-GitHubRepositoryVulnerabilityAlert [Alias('RepositoryUrl')] [string] $Uri, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -2575,8 +2428,6 @@ filter Disable-GitHubRepositoryVulnerabilityAlert AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters ` - -Name NoStatus -ConfigValueName DefaultNoStatus) } Invoke-GHRestMethod @params | Out-Null @@ -2610,12 +2461,6 @@ filter Enable-GitHubRepositorySecurityFix 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 @@ -2666,9 +2511,7 @@ filter Enable-GitHubRepositorySecurityFix [Alias('RepositoryUrl')] [string] $Uri, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -2695,8 +2538,6 @@ filter Enable-GitHubRepositorySecurityFix AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters ` - -Name NoStatus -ConfigValueName DefaultNoStatus) } Invoke-GHRestMethod @params @@ -2730,12 +2571,6 @@ filter Disable-GitHubRepositorySecurityFix 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 @@ -2785,9 +2620,7 @@ filter Disable-GitHubRepositorySecurityFix [Alias('RepositoryUrl')] [string] $Uri, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -2814,8 +2647,6 @@ filter Disable-GitHubRepositorySecurityFix AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue -BoundParameters $PSBoundParameters ` - -Name NoStatus -ConfigValueName DefaultNoStatus) } Invoke-GHRestMethod @params | Out-Null diff --git a/GitHubRepositoryForks.ps1 b/GitHubRepositoryForks.ps1 index dbeaee70..18c1d454 100644 --- a/GitHubRepositoryForks.ps1 +++ b/GitHubRepositoryForks.ps1 @@ -32,12 +32,6 @@ filter Get-GitHubRepositoryFork 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 @@ -65,7 +59,7 @@ filter Get-GitHubRepositoryFork #> [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubRepositoryTypeName})] - [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, @@ -83,9 +77,7 @@ filter Get-GitHubRepositoryFork [ValidateSet('Newest', 'Oldest', 'Stargazers')] [string] $Sort = 'Newest', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -110,7 +102,6 @@ filter Get-GitHubRepositoryFork 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubRepositoryAdditionalProperties) @@ -148,12 +139,6 @@ filter New-GitHubRepositoryFork 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 @@ -204,9 +189,7 @@ filter New-GitHubRepositoryFork [string] $OrganizationName, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -240,7 +223,6 @@ filter New-GitHubRepositoryFork 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = (Invoke-GHRestMethod @params | Add-GitHubRepositoryAdditionalProperties) diff --git a/GitHubRepositoryTraffic.ps1 b/GitHubRepositoryTraffic.ps1 index 3c5ba17e..0b911235 100644 --- a/GitHubRepositoryTraffic.ps1 +++ b/GitHubRepositoryTraffic.ps1 @@ -38,12 +38,6 @@ filter Get-GitHubReferrerTraffic 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 @@ -71,7 +65,7 @@ filter Get-GitHubReferrerTraffic #> [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubReferrerTrafficTypeName})] - [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, @@ -86,9 +80,7 @@ filter Get-GitHubReferrerTraffic [Alias('RepositoryUrl')] [string] $Uri, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -109,7 +101,6 @@ filter Get-GitHubReferrerTraffic 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params @@ -150,12 +141,6 @@ filter Get-GitHubPathTraffic 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 @@ -184,7 +169,7 @@ filter Get-GitHubPathTraffic #> [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubPathTrafficTypeName})] - [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, @@ -199,9 +184,7 @@ filter Get-GitHubPathTraffic [Alias('RepositoryUrl')] [string] $Uri, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -222,7 +205,6 @@ filter Get-GitHubPathTraffic 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params @@ -269,12 +251,6 @@ filter Get-GitHubViewTraffic 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 @@ -303,7 +279,7 @@ filter Get-GitHubViewTraffic #> [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubViewTrafficTypeName})] - [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, @@ -321,9 +297,7 @@ filter Get-GitHubViewTraffic [ValidateSet('Day', 'Week')] [string] $Per = 'Day', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -345,7 +319,6 @@ filter Get-GitHubViewTraffic 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params @@ -392,12 +365,6 @@ filter Get-GitHubCloneTraffic 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 @@ -426,7 +393,7 @@ filter Get-GitHubCloneTraffic #> [CmdletBinding(DefaultParameterSetName = 'Elements')] [OutputType({$script:GitHubCloneTrafficTypeName})] - [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, @@ -444,9 +411,7 @@ filter Get-GitHubCloneTraffic [ValidateSet('Day', 'Week')] [string] $Per = 'Day', - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -468,7 +433,6 @@ filter Get-GitHubCloneTraffic 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params diff --git a/GitHubTeams.ps1 b/GitHubTeams.ps1 index 55d1e31a..0c54fc60 100644 --- a/GitHubTeams.ps1 +++ b/GitHubTeams.ps1 @@ -45,12 +45,6 @@ filter Get-GitHubTeam 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 @@ -81,7 +75,6 @@ filter Get-GitHubTeam [OutputType( {$script:GitHubTeamTypeName}, {$script:GitHubTeamSummaryTypeName})] - [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.")] param ( [Parameter(ParameterSetName='Elements')] @@ -116,9 +109,7 @@ filter Get-GitHubTeam [ValidateNotNullOrEmpty()] [string] $TeamId, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -165,7 +156,6 @@ filter Get-GitHubTeam 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethodMultipleResult @params | @@ -193,8 +183,6 @@ filter Get-GitHubTeam AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue ` - -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params | Add-GitHubTeamAdditionalProperties @@ -228,12 +216,6 @@ filter Get-GitHubTeamMember 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 @@ -280,18 +262,14 @@ filter Get-GitHubTeamMember ParameterSetName='ID')] [int64] $TeamId, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog - $NoStatus = Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus - if ($PSCmdlet.ParameterSetName -eq 'Name') { - $teams = Get-GitHubTeam -OrganizationName $OrganizationName -AccessToken $AccessToken -NoStatus:$NoStatus + $teams = Get-GitHubTeam -OrganizationName $OrganizationName -AccessToken $AccessToken $team = $teams | Where-Object {$_.name -eq $TeamName} if ($null -eq $team) { @@ -315,7 +293,6 @@ filter Get-GitHubTeamMember 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name 'TelemetryProperties' = $telemetryProperties - 'NoStatus' = $NoStatus } return (Invoke-GHRestMethodMultipleResult @params | Add-GitHubUserAdditionalProperties) @@ -357,12 +334,6 @@ function New-GitHubTeam 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.Team GitHub.User @@ -388,9 +359,6 @@ function New-GitHubTeam You can also pipe in a list of GitHub users that were returned from a previous command. #> - [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.')] [CmdletBinding( SupportsShouldProcess, PositionalBinding = $false @@ -425,9 +393,7 @@ function New-GitHubTeam [string] $ParentTeamName, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) begin @@ -483,10 +449,6 @@ function New-GitHubTeam { $getGitHubTeamParms['AccessToken'] = $AccessToken } - if ($PSBoundParameters.ContainsKey('NoStatus')) - { - $getGitHubTeamParms['NoStatus'] = $NoStatus - } $team = Get-GitHubTeam @getGitHubTeamParms @@ -506,8 +468,6 @@ function New-GitHubTeam AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue ` - -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubTeamAdditionalProperties) @@ -544,12 +504,6 @@ filter Set-GitHubTeam 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.Organization GitHub.Team @@ -568,9 +522,6 @@ filter Set-GitHubTeam You can also pipe in a GitHub team that was returned from a previous command. #> - [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.')] [CmdletBinding( SupportsShouldProcess, PositionalBinding = $false @@ -599,9 +550,7 @@ filter Set-GitHubTeam [string] $ParentTeamName, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -618,10 +567,6 @@ filter Set-GitHubTeam { $getGitHubTeamParms['AccessToken'] = $AccessToken } - if ($PSBoundParameters.ContainsKey('NoStatus')) - { - $getGitHubTeamParms['NoStatus'] = $NoStatus - } $orgTeams = Get-GitHubTeam @getGitHubTeamParms @@ -655,8 +600,6 @@ filter Set-GitHubTeam AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue ` - -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubTeamAdditionalProperties) @@ -686,12 +629,6 @@ filter Remove-GitHubTeam 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.Organization GitHub.Team @@ -715,9 +652,6 @@ filter Remove-GitHubTeam You can also pipe in a GitHub team that was returned from a previous command. #> - [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.')] [CmdletBinding( SupportsShouldProcess, PositionalBinding = $false, @@ -744,9 +678,7 @@ filter Remove-GitHubTeam [switch] $Force, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -764,10 +696,6 @@ filter Remove-GitHubTeam { $getGitHubTeamParms['AccessToken'] = $AccessToken } - if ($PSBoundParameters.ContainsKey('NoStatus')) - { - $getGitHubTeamParms['NoStatus'] = $NoStatus - } $team = Get-GitHubTeam @getGitHubTeamParms @@ -790,8 +718,6 @@ filter Remove-GitHubTeam AccessToken = $AccessToken TelemetryEventName = $MyInvocation.MyCommand.Name TelemetryProperties = $telemetryProperties - NoStatus = (Resolve-ParameterWithDefaultConfigurationValue ` - -Name NoStatus -ConfigValueName DefaultNoStatus) } Invoke-GHRestMethod @params | Out-Null diff --git a/GitHubUsers.ps1 b/GitHubUsers.ps1 index b0e9163a..6a83d711 100644 --- a/GitHubUsers.ps1 +++ b/GitHubUsers.ps1 @@ -31,12 +31,6 @@ filter Get-GitHubUser 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. - .NOTES The email key in the following response is the publicly visible email address from the user's GitHub profile page. You only see publicly visible email addresses when @@ -74,7 +68,6 @@ filter Get-GitHubUser #> [CmdletBinding(DefaultParameterSetName = 'ListAndSearch')] [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.")] param( [Parameter( ValueFromPipeline, @@ -87,9 +80,7 @@ filter Get-GitHubUser [Parameter(ParameterSetName='Current')] [switch] $Current, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -97,7 +88,6 @@ filter Get-GitHubUser $params = @{ 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } if ($Current) @@ -153,12 +143,6 @@ filter Get-GitHubUserContextualInformation 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.Issue GitHub.Organization @@ -185,7 +169,6 @@ filter Get-GitHubUserContextualInformation #> [CmdletBinding(DefaultParameterSetName = 'NoContext')] [OutputType({$script:GitHubUserContextualInformationTypeName})] - [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.")] param( [Parameter( Mandatory, @@ -219,9 +202,7 @@ filter Get-GitHubUserContextualInformation ParameterSetName='PullRequest')] [int64] $PullRequestId, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -273,7 +254,6 @@ filter Get-GitHubUserContextualInformation 'AcceptHeader' = $script:hagarAcceptHeader 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } $result = Invoke-GHRestMethod @params @@ -331,12 +311,6 @@ function Set-GitHubProfile 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. - .OUTPUTS GitHub.User @@ -364,9 +338,7 @@ function Set-GitHubProfile [switch] $Hireable, - [string] $AccessToken, - - [switch] $NoStatus + [string] $AccessToken ) Write-InvocationLog @@ -392,7 +364,6 @@ function Set-GitHubProfile 'Description' = "Updating current authenticated user" 'AccessToken' = $AccessToken 'TelemetryEventName' = $MyInvocation.MyCommand.Name - 'NoStatus' = (Resolve-ParameterWithDefaultConfigurationValue -Name NoStatus -ConfigValueName DefaultNoStatus) } return (Invoke-GHRestMethod @params | Add-GitHubUserAdditionalProperties) diff --git a/Helpers.ps1 b/Helpers.ps1 index 87526b1a..4e9116da 100644 --- a/Helpers.ps1 +++ b/Helpers.ps1 @@ -283,7 +283,6 @@ $script:alwaysRedactParametersForLogging = @( ) $script:alwaysExcludeParametersForLogging = @( - 'NoStatus' ) function Write-InvocationLog