Skip to content

Commit 044a123

Browse files
committed
fix: fix help
1 parent 67ae4e2 commit 044a123

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

AzureDevOpsPowerShell/Public/Api/DistributedTask/VariableGroups/Get-AzDoVariableGroup.ps1

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ function Get-AzDoVariableGroup {
6060
} catch {
6161
$PSCmdlet.ThrowTerminatingError((Write-AzDoError -Message "Failed to get variable groups from $ProjectName in $CollectionUri Error: $_" ))
6262
}
63-
$variableGroups | Where-Object { -not $VariableGroupName -or $_.Name -in $VariableGroupName } | ForEach-Object {
63+
$filteredGroups = if ($VariableGroupName) {
64+
$variableGroups | Where-Object { $_.Name -in $VariableGroupName }
65+
} else {
66+
$variableGroups
67+
}
68+
69+
$filteredGroups | ForEach-Object {
6470
$variablesObject = $_.variables | ConvertTo-Json -Depth 10 | ConvertFrom-Json -AsHashtable -Depth 10
6571

6672
$variablesOutput = @{}
@@ -71,11 +77,11 @@ function Get-AzDoVariableGroup {
7177
[PSCustomObject]@{
7278
CollectionURI = $CollectionUri
7379
ProjectName = $ProjectName
74-
VariableGroupName = $_.name
75-
VariableGroupId = $_.id
80+
VariableGroupName = $_.Name
81+
VariableGroupId = $_.Id
7682
Variables = $variablesOutput
77-
CreatedOn = $_.createdOn
78-
IsShared = $_.isShared
83+
CreatedOn = $_.CreatedOn
84+
IsShared = $_.IsShared
7985
}
8086
}
8187
} else {

AzureDevOpsPowerShell/Public/Api/Work/WorkItems/Set-AzDoWorkItem.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ function Set-AzDoWorkItem {
5151
[string]
5252
$ProjectName,
5353

54+
# Work item to update
5455
[Parameter(Mandatory, ValueFromPipelineByPropertyName)]
5556
[object[]]
5657
$WorkItem

0 commit comments

Comments
 (0)