Last active
June 13, 2019 18:23
-
-
Save chriskuech/65627f6e2c374b5d9ed3a487a4b1f2c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# constant parameters | |
$org = "MyAzureDevOpsOrgName" | |
$project = "MyAzureDevOpsProjectName" | |
$areaPath = "/the/area/path/containing/my/work/items" | |
$tag = "the-tag-that-identifies-work-items-as-automanaged" | |
$query = @" | |
SELECT * | |
FROM WorkItems | |
WHERE [Tags] CONTAINS '$tag' | |
AND [System.AreaPath] == '$areaPath' | |
"@ | |
<# | |
.SYNOPSIS | |
List the automatically managed work items in Azure Boards | |
#> | |
function Get-WorkItems { | |
az boards query ` | |
--org "https://dev.azure.com/$org" ` | |
--project $project ` | |
--wiql ($query -replace "\s+", " ").Trim() ` | |
| ConvertFrom-Json | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment