Skip to content

Commit

Permalink
Released v2.14
Browse files Browse the repository at this point in the history
  • Loading branch information
lipkau committed Mar 28, 2020
2 parents 396fb88 + 85acc26 commit 6499fea
Show file tree
Hide file tree
Showing 77 changed files with 187 additions and 170 deletions.
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// for the documentation about the extensions.json format
"recommendations": [
"ms-vscode.PowerShell",
"DavidAnson.vscode-markdownlint",
"streetsidesoftware.code-spell-checker"
"DavidAnson.vscode-markdownlint"
]
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## [NEXT VERSION] - YYYY-MM-DD

## [2.14] - 2020-03-28

### Changed

- Changed all commands to only use Jira's api version 2. (#409, [@lipkau])
This is a temporary fix and should be reverted to version `latest` as soon as
a proper handling of how users work between cloud and on-premise is
implemented

## [2.13] - 2020-02-23

### Added
Expand Down
18 changes: 11 additions & 7 deletions JiraPS.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ task GetNextVersion {

#region HarmonizeVariables
switch ($true) {
{$IsWindows} {
{ $IsWindows } {
$OS = "Windows"
if (-not ($IsCoreCLR)) {
$OSVersion = $PSVersionTable.BuildVersion.ToString()
}
}
{$IsLinux} {
{ $IsLinux } {
$OS = "Linux"
}
{$IsMacOs} {
{ $IsMacOs } {
$OS = "OSX"
}
{$IsCoreCLR} {
{ $IsCoreCLR } {
$OSVersion = $PSVersionTable.OS
}
}
Expand Down Expand Up @@ -185,7 +185,7 @@ task GenerateExternalHelp Init, {
task UpdateManifest GetNextVersion, {
Remove-Module $env:BHProjectName -ErrorAction SilentlyContinue
Import-Module $env:BHPSModuleManifest -Force
$ModuleAlias = @(Get-Alias | Where-Object {$_.ModuleName -eq "$env:BHProjectName"})
$ModuleAlias = @(Get-Alias | Where-Object { $_.ModuleName -eq "$env:BHProjectName" })

BuildHelpers\Update-Metadata -Path "$env:BHBuildOutput/$env:BHProjectName/$env:BHProjectName.psd1" -PropertyName ModuleVersion -Value $env:NextBuildVersion
# BuildHelpers\Update-Metadata -Path "$env:BHBuildOutput/$env:BHProjectName/$env:BHProjectName.psd1" -PropertyName FileList -Value (Get-ChildItem "$env:BHBuildOutput/$env:BHProjectName" -Recurse).Name
Expand Down Expand Up @@ -247,7 +247,7 @@ task Deploy Init, PublishToGallery, TagReplository, UpdateHomepage
# Synpsis: Publish the $release to the PSGallery
task PublishToGallery {
Assert-True (-not [String]::IsNullOrEmpty($PSGalleryAPIKey)) "No key for the PSGallery"
Assert-True {Get-Module $env:BHProjectName -ListAvailable} "Module $env:BHProjectName is not available"
Assert-True { Get-Module $env:BHProjectName -ListAvailable } "Module $env:BHProjectName is not available"

Remove-Module $env:BHProjectName -ErrorAction Ignore

Expand All @@ -258,6 +258,8 @@ task PublishToGallery {
task TagReplository GetNextVersion, Package, {
$releaseText = "Release version $env:NextBuildVersion"

Set-GitUser

# Push a tag to the repository
Write-Build Gray "git checkout $ENV:BHBranchName"
cmd /c "git checkout $ENV:BHBranchName 2>&1"
Expand All @@ -283,6 +285,8 @@ task TagReplository GetNextVersion, Package, {
# Synopsis: Update the version of this module that the homepage uses
task UpdateHomepage {
try {
Set-GitUser

Write-Build Gray "git close .../AtlassianPS.github.io --recursive"
$null = cmd /c "git clone https://github.com/AtlassianPS/AtlassianPS.github.io --recursive 2>&1"

Expand All @@ -307,7 +311,7 @@ task UpdateHomepage {

Pop-Location
}
catch { Write-Warning "Failed to deploy to homepage"}
catch { Write-Warning "Failed to deploy to homepage" }
}
#endregion Publish

Expand Down
2 changes: 1 addition & 1 deletion JiraPS/JiraPS.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RootModule = 'JiraPS.psm1'

# Version number of this module.
ModuleVersion = '2.13'
ModuleVersion = '2.14'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Add-JiraGroupMember.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Add-JiraGroupMember {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/group/user?groupname={0}"
$resourceURi = "$server/rest/api/2/group/user?groupname={0}"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Add-JiraIssueLink.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function Add-JiraIssueLink {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/issueLink"
$resourceURi = "$server/rest/api/2/issueLink"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Find-JiraFilter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function Find-JiraFilter {

$server = Get-JiraConfigServer -ErrorAction Stop

$searchURi = "$server/rest/api/latest/filter/search"
$searchURi = "$server/rest/api/2/filter/search"

[String]$Fields = $Fields -join ','
}
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraComponent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function Get-JiraComponent {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest{0}"
$resourceURi = "$server/rest/api/2{0}"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraField.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/field"
$resourceURi = "$server/rest/api/2/field"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraFilter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/filter/{0}"
$resourceURi = "$server/rest/api/2/filter/{0}"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Get-JiraGroup {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/group?groupname={0}"
$resourceURi = "$server/rest/api/2/group?groupname={0}"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraGroupMember.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function Get-JiraGroupMember {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/group/member"
$resourceURi = "$server/rest/api/2/group/member"

if ($PageSize -gt 50) {
Write-Warning "JIRA's API may not properly support MaxResults values higher than 50 for this method. If you receive inconsistent results, do not pass the MaxResults parameter to this function to return all results."
Expand Down
4 changes: 2 additions & 2 deletions JiraPS/Public/Get-JiraIssue.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ function Get-JiraIssue {

$server = Get-JiraConfigServer -ErrorAction Stop

$searchURi = "$server/rest/api/latest/search"
$resourceURi = "$server/rest/api/latest/issue/{0}"
$searchURi = "$server/rest/api/2/search"
$resourceURi = "$server/rest/api/2/issue/{0}"

[String]$Fields = $Fields -join ","
}
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraIssueCreateMetadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Get-JiraIssueCreateMetadata {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/issue/createmeta?projectIds={0}&issuetypeIds={1}&expand=projects.issuetypes.fields"
$resourceURi = "$server/rest/api/2/issue/createmeta?projectIds={0}&issuetypeIds={1}&expand=projects.issuetypes.fields"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraIssueEditMetadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Get-JiraIssueEditMetadata {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/issue/{0}/editmeta"
$resourceURi = "$server/rest/api/2/issue/{0}/editmeta"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraIssueLinkType.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function Get-JiraIssueLinkType {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/issueLinkType{0}"
$resourceURi = "$server/rest/api/2/issueLinkType{0}"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraIssueType.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/issuetype"
$resourceURi = "$server/rest/api/2/issuetype"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraPriority.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Get-JiraPriority {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/priority{0}"
$resourceURi = "$server/rest/api/2/priority{0}"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraProject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Get-JiraProject {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/project{0}?expand=description,lead,issueTypes,url,projectKeys"
$resourceURi = "$server/rest/api/2/project{0}?expand=description,lead,issueTypes,url,projectKeys"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraServerInformation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Get-JiraServerInformation {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/serverInfo"
$resourceURi = "$server/rest/api/2/serverInfo"
}

process {
Expand Down
6 changes: 3 additions & 3 deletions JiraPS/Public/Get-JiraUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ function Get-JiraUser {

$server = Get-JiraConfigServer -ErrorAction Stop

$selfResourceUri = "$server/rest/api/latest/myself"
$searchResourceUri = "$server/rest/api/latest/user/search?username={0}"
$exactResourceUri = "$server/rest/api/latest/user?username={0}"
$selfResourceUri = "$server/rest/api/2/myself"
$searchResourceUri = "$server/rest/api/2/user/search?username={0}"
$exactResourceUri = "$server/rest/api/2/user?username={0}"

if ($IncludeInactive) {
$searchResourceUri += "&includeInactive=true"
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Get-JiraVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/{0}"
$resourceURi = "$server/rest/api/2/{0}"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Move-JiraVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

$server = Get-JiraConfigServer -ErrorAction Stop

$versionResourceUri = "$server/rest/api/latest/version/{0}/move"
$versionResourceUri = "$server/rest/api/2/version/{0}/move"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/New-JiraFilter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function New-JiraFilter {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/filter"
$resourceURi = "$server/rest/api/2/filter"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/New-JiraGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/group"
$resourceURi = "$server/rest/api/2/group"
}

process {
Expand Down
4 changes: 2 additions & 2 deletions JiraPS/Public/New-JiraIssue.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function New-JiraIssue {

$createmeta = Get-JiraIssueCreateMetadata -Project $Project -IssueType $IssueType -Credential $Credential -ErrorAction Stop -Debug:$false

$resourceURi = "$server/rest/api/latest/issue"
$resourceURi = "$server/rest/api/2/issue"

Write-DebugMessage "[$($MyInvocation.MyCommand.Name)] ParameterSetName: $($PsCmdlet.ParameterSetName)"
Write-DebugMessage "[$($MyInvocation.MyCommand.Name)] PSBoundParameters: $($PSBoundParameters | Out-String)"
Expand Down Expand Up @@ -177,7 +177,7 @@ function New-JiraIssue {
if ($PSCmdlet.ShouldProcess($Summary, "Creating new Issue on JIRA")) {
if ($result = Invoke-JiraMethod @parameter) {
# REST result will look something like this:
# {"id":"12345","key":"IT-3676","self":"http://jiraserver.example.com/rest/api/latest/issue/12345"}
# {"id":"12345","key":"IT-3676","self":"http://jiraserver.example.com/rest/api/2/issue/12345"}
# This will fetch the created issue to return it with all it'a properties
Write-Output (Get-JiraIssue -Key $result.Key -Credential $Credential)
}
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/New-JiraUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function New-JiraUser {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/user"
$resourceURi = "$server/rest/api/2/user"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/New-JiraVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/version"
$resourceURi = "$server/rest/api/2/version"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Remove-JiraGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/group?groupname={0}"
$resourceURi = "$server/rest/api/2/group?groupname={0}"

if ($Force) {
Write-DebugMessage "[$($MyInvocation.MyCommand.Name)] -Force was passed. Backing up current ConfirmPreference [$ConfirmPreference] and setting to None"
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Remove-JiraGroupMember.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function Remove-JiraGroupMember {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/group/user?groupname={0}&username={1}"
$resourceURi = "$server/rest/api/2/group/user?groupname={0}&username={1}"

if ($Force) {
Write-DebugMessage "[$($MyInvocation.MyCommand.Name)] -Force was passed. Backing up current ConfirmPreference [$ConfirmPreference] and setting to None"
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Remove-JiraIssue.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function Remove-JiraIssue {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/issue/{0}?deleteSubtasks={1}"
$resourceURi = "$server/rest/api/2/issue/{0}?deleteSubtasks={1}"

if ($Force) {
Write-DebugMessage "[$($MyInvocation.MyCommand.Name)] -Force was passed. Backing up current ConfirmPreference [$ConfirmPreference] and setting to None"
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Remove-JiraIssueAttachment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function Remove-JiraIssueAttachment {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/attachment/{0}"
$resourceURi = "$server/rest/api/2/attachment/{0}"

if ($Force) {
Write-DebugMessage "[Remove-JiraGroupMember] -Force was passed. Backing up current ConfirmPreference [$ConfirmPreference] and setting to None"
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Remove-JiraIssueLink.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Remove-JiraIssueLink {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/issueLink/{0}"
$resourceURi = "$server/rest/api/2/issueLink/{0}"
}

process {
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Remove-JiraRemoteLink.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function Remove-JiraRemoteLink {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/issue/{0}/remotelink/{1}"
$resourceURi = "$server/rest/api/2/issue/{0}/remotelink/{1}"

if ($Force) {
Write-DebugMessage "[$($MyInvocation.MyCommand.Name)] -Force was passed. Backing up current ConfirmPreference [$ConfirmPreference] and setting to None"
Expand Down
2 changes: 1 addition & 1 deletion JiraPS/Public/Remove-JiraUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function Remove-JiraUser {

$server = Get-JiraConfigServer -ErrorAction Stop

$resourceURi = "$server/rest/api/latest/user?username={0}"
$resourceURi = "$server/rest/api/2/user?username={0}"

if ($Force) {
Write-DebugMessage "[Remove-JiraGroup] -Force was passed. Backing up current ConfirmPreference [$ConfirmPreference] and setting to None"
Expand Down
Loading

0 comments on commit 6499fea

Please sign in to comment.