diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ba15a8c..d48e7fed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ ## [NEXT VERSION] - YYYY-MM-DD +## [2.11] - 2019-07-02 + +### Added + +- Unit test for synopsis in cmdlet documentation (#344, [@alexsuslin]) + +### Changed + +- `Invoke-JiraIssueTransition` to find username with exact match (#351, [@mirrorgleam]) +- Fixed `-Add ` parameter for `Set-JiraIssueLabel` on issues without labels (#358, [@lipkau]) + ## [2.10] - 2019-02-21 ### Added @@ -327,6 +338,7 @@ which is in turn inspired by the [Vagrant](https://github.com/mitchellh/vagrant/ [@lipkau]: https://github.com/lipkau [@lukhase]: https://github.com/lukhase [@michalporeba]: https://github.com/michalporeba + [@mirrorgleam]: https://github.com/mirrorgleam [@nojp]: https://github.com/nojp [@padgers]: https://github.com/padgers [@ThePSAdmin]: https://github.com/ThePSAdmin diff --git a/JiraPS/JiraPS.psd1 b/JiraPS/JiraPS.psd1 index 5b9dc3a4..46e7cf25 100644 --- a/JiraPS/JiraPS.psd1 +++ b/JiraPS/JiraPS.psd1 @@ -4,7 +4,7 @@ RootModule = 'JiraPS.psm1' # Version number of this module. - ModuleVersion = '2.10' + ModuleVersion = '2.11' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/JiraPS/Public/Set-JiraIssueLabel.ps1 b/JiraPS/Public/Set-JiraIssueLabel.ps1 index 4139f5c6..343c9a8a 100644 --- a/JiraPS/Public/Set-JiraIssueLabel.ps1 +++ b/JiraPS/Public/Set-JiraIssueLabel.ps1 @@ -69,7 +69,7 @@ # Find the proper object for the Issue $issueObj = Resolve-JiraIssueObject -InputObject $_issue -Credential $Credential - $labels = [System.Collections.ArrayList]@($issueObj.labels) + $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 @@ -114,7 +114,7 @@ $parameter = @{ URI = $issueObj.RestURL Method = "PUT" - Body = ConvertTo-Json -InputObject $requestBody -Depth 4 + Body = ConvertTo-Json -InputObject $requestBody -Depth 6 Credential = $Credential } Write-Debug "[$($MyInvocation.MyCommand.Name)] Invoking JiraMethod with `$parameter" diff --git a/Tests/Help.Tests.ps1 b/Tests/Help.Tests.ps1 index fc8af971..65375318 100644 --- a/Tests/Help.Tests.ps1 +++ b/Tests/Help.Tests.ps1 @@ -109,6 +109,12 @@ Describe "Help tests" -Tag Documentation { $help.Synopsis | Should -Not -BeNullOrEmpty } + # Should be a syntax for every function + It "has a syntax" { + # syntax is starting with a small case as all the standard powershell commands have syntax with lower case, see (Get-Help Get-ChildItem) | gm + $help.syntax | Should -Not -BeNullOrEmpty + } + # Should be a description for every function It "has a description" { $help.Description.Text -join '' | Should -Not -BeNullOrEmpty diff --git a/Tools/BuildTools.psm1 b/Tools/BuildTools.psm1 index c77da9d2..e608861a 100644 --- a/Tools/BuildTools.psm1 +++ b/Tools/BuildTools.psm1 @@ -65,7 +65,7 @@ function Install-Dependency { $Policy = (Get-PSRepository PSGallery).InstallationPolicy try { Set-PSRepository PSGallery -InstallationPolicy Trusted - $RequiredModules | Install-Module -Scope $Scope -Repository PSGallery -SkipPublisherCheck -AllowClobber -Verbose + $RequiredModules | Install-Module -Scope $Scope -Repository PSGallery -SkipPublisherCheck -AllowClobber } finally { Set-PSRepository PSGallery -InstallationPolicy $Policy } diff --git a/Tools/setup.ps1 b/Tools/setup.ps1 index c3ea91d9..0623a279 100644 --- a/Tools/setup.ps1 +++ b/Tools/setup.ps1 @@ -10,12 +10,6 @@ if (-not ($gallery = Get-PSRepository -Name PSGallery -ErrorAction SilentlyConti $null = Install-PackageProvider -Name NuGet -Force -ErrorAction SilentlyContinue } -# Make PSGallery trusted, to aviod a confirmation in the console -if (-not ($gallery.Trusted)) { - Write-Host "Trusting PSGallery" - Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted -ErrorAction SilentlyContinue -} - # Update PowerShellGet if needed if ((Get-Module PowershellGet -ListAvailable)[0].Version -lt [version]"1.6.0") { Write-Host "Updating PowershellGet"