Last active
August 14, 2023 20:56
-
-
Save codebytes/6291931f4ab5fd160304b6d6735cef29 to your computer and use it in GitHub Desktop.
export-ado-workitems.sh
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
#!/bin/sh | |
org=https://dev.azure.com/ChrisAyersFTA | |
project=Sample | |
saName=cayersadotestsa | |
saContainer=ado | |
az extension add --name azure-devops --upgrade -y | |
az devops project list --org=$org -o table | |
# az boards query --wiql "SELECT [System.Id], [System.Title], [System.AssignedTo], [System.State], [System.AreaPath], [System.IterationPath], [System.Tags], [System.CommentCount] FROM workitems WHERE [System.TeamProject] = '${project}' ORDER BY [System.IterationPath]" | |
ids=$(az boards query --wiql "SELECT [System.Id] FROM workitems WHERE [System.TeamProject] = '${project}' ORDER BY [System.IterationPath]" \ | |
--query '[].id' \ | |
--output tsv) | |
mkdir -p workitems | |
for id in $ids | |
do | |
az boards work-item show --id $id -o json > workitems/$id.json | |
done | |
az storage blob upload-batch --account-name $saName -d $saContainer -s workitems/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment