From d94ceb831109950a697ad1a7fe6efb74a07eb3d7 Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Fri, 25 May 2018 07:23:06 +0200 Subject: [PATCH 1/3] Added missing alias for `-Key` parameter --- JiraPS/Public/Get-JiraIssue.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/JiraPS/Public/Get-JiraIssue.ps1 b/JiraPS/Public/Get-JiraIssue.ps1 index 552a3af7..2b375bff 100644 --- a/JiraPS/Public/Get-JiraIssue.ps1 +++ b/JiraPS/Public/Get-JiraIssue.ps1 @@ -3,6 +3,7 @@ function Get-JiraIssue { param( [Parameter( Position = 0, Mandatory, ParameterSetName = 'ByIssueKey' )] [ValidateNotNullOrEmpty()] + [Alias('Issue')] [String[]] $Key, @@ -80,8 +81,11 @@ function Get-JiraIssue { [Int] $PageSize = 50, - [PSCredential] - $Credential + [Parameter()] + [ValidateNotNull()] + [System.Management.Automation.PSCredential] + [System.Management.Automation.Credential()] + $Credential = [System.Management.Automation.PSCredential]::Empty ) begin { From 3f76e13a566abc0a65d5d053b1ce271c03d1ab26 Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Fri, 25 May 2018 07:24:07 +0200 Subject: [PATCH 2/3] Updated documentation to reflect parameter `-Issue` --- docs/en-US/about_JiraPS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en-US/about_JiraPS.md b/docs/en-US/about_JiraPS.md index fabb3d40..40cc6fd4 100644 --- a/docs/en-US/about_JiraPS.md +++ b/docs/en-US/about_JiraPS.md @@ -33,7 +33,7 @@ Set-JiraConfigServer -Server "https://jira.server.com" $cred = Get-Credential # Get the date from the issue "PR-123" -Get-JiraIssue -Issue "PR-123" -Credential $cred +Get-JiraIssue -Key "PR-123" -Credential $cred ``` JiraPS uses the information provided by `Set-JiraConfigServer` to resolve what server to connect to. From c63790aba96ae38b254797b6db3a8c9a4d0a4db7 Mon Sep 17 00:00:00 2001 From: Oliver Lipkau Date: Sat, 26 May 2018 19:15:40 +0200 Subject: [PATCH 3/3] Reverted changes to `Credential` parameter --- JiraPS/Public/Get-JiraIssue.ps1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/JiraPS/Public/Get-JiraIssue.ps1 b/JiraPS/Public/Get-JiraIssue.ps1 index 2b375bff..732633c6 100644 --- a/JiraPS/Public/Get-JiraIssue.ps1 +++ b/JiraPS/Public/Get-JiraIssue.ps1 @@ -81,11 +81,8 @@ function Get-JiraIssue { [Int] $PageSize = 50, - [Parameter()] - [ValidateNotNull()] [System.Management.Automation.PSCredential] - [System.Management.Automation.Credential()] - $Credential = [System.Management.Automation.PSCredential]::Empty + $Credential ) begin {