refactor and fix various functions for improved logging and pipeline support - #151
Conversation
…rs to allow piping parameters
…nfirmation before removal
| Assert-AreEqual -Expected $title -Presented $result0[0].Title | ||
|
|
||
| $result1 = $item | Show-ProjectItem -Attributes "id","Title","Status" | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| if ($null -eq $Object) { | ||
| return "null" | ||
| } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| if ($Object -is [string]) { | ||
| return $Object | ||
| } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| $params.OutFile = $OutFile | ||
| } | ||
|
|
||
| ">> $Method $Uri" | Write-MyDebug -section "invokeRestMethod" |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
|
|
||
| ">> $Method $Uri" | Write-MyDebug -section "invokeRestMethod" | ||
| $result = Microsoft.PowerShell.Utility\Invoke-RestMethod @params | ||
| "<< $Method $Uri" | Write-MyDebug -section "invokeRestMethod" |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| [Parameter()][string]$ProjectNumber, | ||
| [Parameter()][string[]]$DisplayFields | ||
| [Parameter(ValueFromPipelineByPropertyName)][string]$Owner, | ||
| [Parameter(ValueFromPipelineByPropertyName)][string]$ProjectNumber, |
Check warning
Code scanning / PSScriptAnalyzer
Command accepts pipeline input but has not defined a process block. Warning
| [Parameter()][string[]]$DisplayFields | ||
| [Parameter(ValueFromPipelineByPropertyName)][string]$Owner, | ||
| [Parameter(ValueFromPipelineByPropertyName)][string]$ProjectNumber, | ||
| [Parameter(ValueFromPipelineByPropertyName)][string[]]$DisplayFields |
Check warning
Code scanning / PSScriptAnalyzer
Command accepts pipeline input but has not defined a process block. Warning
|
|
||
| function Add-Attributes{ | ||
|
|
||
| function Show-ProjectItem{ |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Show-ProjectItem' does not have a help comment. Note
| if ($PSCmdlet.ShouldProcess($ItemId, "RRemove from project $Owner/$ProjectNumber")) { | ||
| $response = Invoke-MyCommand -Command RemoveItemFromProject -Parameters @{ projectid = $projectId ; itemid = $ItemId } | ||
| } else { | ||
| return $ItemId |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Remove-ProjectItemDirect' returns an object of type 'System.String' but this type is not declared in the OutputType attribute. Note
| $fields | Write-Verbose | ||
| } | ||
| # $fields | Write-Verbose | ||
| # } |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
Enhance logging consistency and add support for ValueFromPipelineByPropertyName in several functions. Update the FindProject query structure to include additional fields. Introduce helper functions for managing test transcripts.