From 1c524e8614954ab21c500ed7585c1015fd8ebc2e Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Thu, 13 Jun 2024 12:15:20 +0000 Subject: [PATCH] fixed file encoding --- JiraPS/JiraPS.psm1 | 2 +- JiraPS/Private/Resolve-JiraError.ps1 | 4 ++-- JiraPS/Public/Add-JiraFilterPermission.ps1 | 2 +- JiraPS/Public/Add-JiraIssueWatcher.ps1 | 2 +- JiraPS/Public/Get-JiraField.ps1 | 4 ++-- JiraPS/Public/Get-JiraFilter.ps1 | 2 +- JiraPS/Public/Get-JiraIssueType.ps1 | 6 +++--- JiraPS/Public/Get-JiraIssueWatcher.ps1 | 2 +- JiraPS/Public/Get-JiraVersion.ps1 | 4 ++-- JiraPS/Public/Move-JiraVersion.ps1 | 5 +++-- JiraPS/Public/New-JiraGroup.ps1 | 2 +- JiraPS/Public/Remove-JiraFilterPermission.ps1 | 2 +- JiraPS/Public/Remove-JiraGroup.ps1 | 2 +- JiraPS/Public/Remove-JiraIssueWatcher.ps1 | 2 +- JiraPS/Public/Remove-JiraVersion.ps1 | 2 +- JiraPS/Public/Set-JiraIssueLabel.ps1 | 4 ++-- JiraPS/Public/Set-JiraVersion.ps1 | 2 +- 17 files changed, 25 insertions(+), 24 deletions(-) diff --git a/JiraPS/JiraPS.psm1 b/JiraPS/JiraPS.psm1 index 4ab37388..9c45c76a 100644 --- a/JiraPS/JiraPS.psm1 +++ b/JiraPS/JiraPS.psm1 @@ -1,4 +1,4 @@ -#region Dependencies +#region Dependencies # Load the ConfluencePS namespace from C# # if (!("" -as [Type])) { # Add-Type -Path (Join-Path $PSScriptRoot JiraPS.Types.cs) -ReferencedAssemblies Microsoft.CSharp, Microsoft.PowerShell.Commands.Utility, System.Management.Automation diff --git a/JiraPS/Private/Resolve-JiraError.ps1 b/JiraPS/Private/Resolve-JiraError.ps1 index b87bfda2..2752b5ad 100644 --- a/JiraPS/Private/Resolve-JiraError.ps1 +++ b/JiraPS/Private/Resolve-JiraError.ps1 @@ -1,4 +1,4 @@ -function Resolve-JiraError { +function Resolve-JiraError { [CmdletBinding()] param( [Parameter( ValueFromPipeline )] @@ -44,7 +44,7 @@ } } elseif ($i.errors) { - $keys = (Get-Member -InputObject $i.errors | Where-Object -FilterScript {$_.MemberType -eq 'NoteProperty'}).Name + $keys = (Get-Member -InputObject $i.errors | Where-Object -FilterScript { $_.MemberType -eq 'NoteProperty' }).Name foreach ($k in $keys) { if ($WriteError) { $exception = ([System.ArgumentException]"Server responded with Error") diff --git a/JiraPS/Public/Add-JiraFilterPermission.ps1 b/JiraPS/Public/Add-JiraFilterPermission.ps1 index 74dc3de4..7f084968 100644 --- a/JiraPS/Public/Add-JiraFilterPermission.ps1 +++ b/JiraPS/Public/Add-JiraFilterPermission.ps1 @@ -1,4 +1,4 @@ -function Add-JiraFilterPermission { +function Add-JiraFilterPermission { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( SupportsShouldProcess, DefaultParameterSetName = 'ByInputObject' )] # [OutputType( [JiraPS.FilterPermission] )] diff --git a/JiraPS/Public/Add-JiraIssueWatcher.ps1 b/JiraPS/Public/Add-JiraIssueWatcher.ps1 index fb930288..4dfbd6d4 100644 --- a/JiraPS/Public/Add-JiraIssueWatcher.ps1 +++ b/JiraPS/Public/Add-JiraIssueWatcher.ps1 @@ -1,4 +1,4 @@ -function Add-JiraIssueWatcher { +function Add-JiraIssueWatcher { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( SupportsShouldProcess )] param( diff --git a/JiraPS/Public/Get-JiraField.ps1 b/JiraPS/Public/Get-JiraField.ps1 index aee0a8ba..589440e6 100644 --- a/JiraPS/Public/Get-JiraField.ps1 +++ b/JiraPS/Public/Get-JiraField.ps1 @@ -1,4 +1,4 @@ -function Get-JiraField { +function Get-JiraField { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( DefaultParameterSetName = '_All' )] param( @@ -43,7 +43,7 @@ $allFields = Get-JiraField -Credential $Credential - Write-Output ($allFields | Where-Object -FilterScript {($_.Id -eq $_field) -or ($_.Name -like $_field)}) + Write-Output ($allFields | Where-Object -FilterScript { ($_.Id -eq $_field) -or ($_.Name -like $_field) }) } } } diff --git a/JiraPS/Public/Get-JiraFilter.ps1 b/JiraPS/Public/Get-JiraFilter.ps1 index c5f586b5..4a447ae5 100644 --- a/JiraPS/Public/Get-JiraFilter.ps1 +++ b/JiraPS/Public/Get-JiraFilter.ps1 @@ -1,4 +1,4 @@ -function Get-JiraFilter { +function Get-JiraFilter { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding(DefaultParameterSetName = 'ByFilterID')] param( diff --git a/JiraPS/Public/Get-JiraIssueType.ps1 b/JiraPS/Public/Get-JiraIssueType.ps1 index f5fd9ef5..fc1ea8a8 100644 --- a/JiraPS/Public/Get-JiraIssueType.ps1 +++ b/JiraPS/Public/Get-JiraIssueType.ps1 @@ -1,4 +1,4 @@ -function Get-JiraIssueType { +function Get-JiraIssueType { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( DefaultParameterSetName = '_All' )] param( @@ -43,8 +43,8 @@ $allIssueTypes = Get-JiraIssueType -Credential $Credential - Write-Output ($allIssueTypes | Where-Object -FilterScript {$_.Id -eq $_issueType}) - Write-Output ($allIssueTypes | Where-Object -FilterScript {$_.Name -like $_issueType}) + Write-Output ($allIssueTypes | Where-Object -FilterScript { $_.Id -eq $_issueType }) + Write-Output ($allIssueTypes | Where-Object -FilterScript { $_.Name -like $_issueType }) } } } diff --git a/JiraPS/Public/Get-JiraIssueWatcher.ps1 b/JiraPS/Public/Get-JiraIssueWatcher.ps1 index e6c0f97a..f3284246 100644 --- a/JiraPS/Public/Get-JiraIssueWatcher.ps1 +++ b/JiraPS/Public/Get-JiraIssueWatcher.ps1 @@ -1,4 +1,4 @@ -function Get-JiraIssueWatcher { +function Get-JiraIssueWatcher { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding()] param( diff --git a/JiraPS/Public/Get-JiraVersion.ps1 b/JiraPS/Public/Get-JiraVersion.ps1 index 3b95dacf..223bd5e3 100644 --- a/JiraPS/Public/Get-JiraVersion.ps1 +++ b/JiraPS/Public/Get-JiraVersion.ps1 @@ -1,4 +1,4 @@ -function Get-JiraVersion { +function Get-JiraVersion { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( SupportsPaging, DefaultParameterSetName = 'byId' )] param( @@ -109,7 +109,7 @@ $result | Where-Object { $__ = $_.Name Write-DebugMessage ($__ | Out-String) - $Name | Foreach-Object { + $Name | ForEach-Object { Write-Verbose "[$($MyInvocation.MyCommand.Name)] Matching $_ against $($__)" $__ -like $_ } diff --git a/JiraPS/Public/Move-JiraVersion.ps1 b/JiraPS/Public/Move-JiraVersion.ps1 index 185acc8a..8bdcd5ec 100644 --- a/JiraPS/Public/Move-JiraVersion.ps1 +++ b/JiraPS/Public/Move-JiraVersion.ps1 @@ -1,4 +1,4 @@ -function Move-JiraVersion { +function Move-JiraVersion { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( DefaultParameterSetName = 'ByAfter' )] param( @@ -95,7 +95,8 @@ if ($Version.Id) { $versionId = $Version.Id - } else { + } + else { $versionId = $Version } diff --git a/JiraPS/Public/New-JiraGroup.ps1 b/JiraPS/Public/New-JiraGroup.ps1 index 9a0a46c9..c00809ce 100644 --- a/JiraPS/Public/New-JiraGroup.ps1 +++ b/JiraPS/Public/New-JiraGroup.ps1 @@ -1,4 +1,4 @@ -function New-JiraGroup { +function New-JiraGroup { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( SupportsShouldProcess )] param( diff --git a/JiraPS/Public/Remove-JiraFilterPermission.ps1 b/JiraPS/Public/Remove-JiraFilterPermission.ps1 index d07d5573..1dbb7824 100644 --- a/JiraPS/Public/Remove-JiraFilterPermission.ps1 +++ b/JiraPS/Public/Remove-JiraFilterPermission.ps1 @@ -1,4 +1,4 @@ -function Remove-JiraFilterPermission { +function Remove-JiraFilterPermission { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( SupportsShouldProcess, DefaultParameterSetName = 'ByFilterId' )] param( diff --git a/JiraPS/Public/Remove-JiraGroup.ps1 b/JiraPS/Public/Remove-JiraGroup.ps1 index ae04ea30..1e4bc423 100644 --- a/JiraPS/Public/Remove-JiraGroup.ps1 +++ b/JiraPS/Public/Remove-JiraGroup.ps1 @@ -1,4 +1,4 @@ -function Remove-JiraGroup { +function Remove-JiraGroup { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( SupportsShouldProcess, ConfirmImpact = 'High' )] param( diff --git a/JiraPS/Public/Remove-JiraIssueWatcher.ps1 b/JiraPS/Public/Remove-JiraIssueWatcher.ps1 index 1d8ff434..3461a8a0 100644 --- a/JiraPS/Public/Remove-JiraIssueWatcher.ps1 +++ b/JiraPS/Public/Remove-JiraIssueWatcher.ps1 @@ -1,4 +1,4 @@ -function Remove-JiraIssueWatcher { +function Remove-JiraIssueWatcher { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( SupportsShouldProcess )] param( diff --git a/JiraPS/Public/Remove-JiraVersion.ps1 b/JiraPS/Public/Remove-JiraVersion.ps1 index 8974c16b..dacea0da 100644 --- a/JiraPS/Public/Remove-JiraVersion.ps1 +++ b/JiraPS/Public/Remove-JiraVersion.ps1 @@ -1,4 +1,4 @@ -function Remove-JiraVersion { +function Remove-JiraVersion { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( ConfirmImpact = 'High', SupportsShouldProcess )] param( diff --git a/JiraPS/Public/Set-JiraIssueLabel.ps1 b/JiraPS/Public/Set-JiraIssueLabel.ps1 index 343c9a8a..3bb3a538 100644 --- a/JiraPS/Public/Set-JiraIssueLabel.ps1 +++ b/JiraPS/Public/Set-JiraIssueLabel.ps1 @@ -1,4 +1,4 @@ -function Set-JiraIssueLabel { +function Set-JiraIssueLabel { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( SupportsShouldProcess, DefaultParameterSetName = 'ReplaceLabels' )] param( @@ -69,7 +69,7 @@ # Find the proper object for the Issue $issueObj = Resolve-JiraIssueObject -InputObject $_issue -Credential $Credential - $labels = [System.Collections.ArrayList]@($issueObj.labels | Where-Object {$_}) + $labels = [System.Collections.ArrayList]@($issueObj.labels | Where-Object { $_ }) # As of JIRA 6.4, the Add and Remove verbs in the REST API for # updating issues do not support arrays of parameters - you diff --git a/JiraPS/Public/Set-JiraVersion.ps1 b/JiraPS/Public/Set-JiraVersion.ps1 index 18c104ce..58c94ced 100644 --- a/JiraPS/Public/Set-JiraVersion.ps1 +++ b/JiraPS/Public/Set-JiraVersion.ps1 @@ -1,4 +1,4 @@ -function Set-JiraVersion { +function Set-JiraVersion { # .ExternalHelp ..\JiraPS-help.xml [CmdletBinding( SupportsShouldProcess )] param(