Skip to content

Commit abcb7a9

Browse files
Merge pull request #3 from joshjohanning/area-path-migration
using area paths to migrate instead of tags for ado
2 parents 395e63e + 21c3ef5 commit abcb7a9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ado_workitems_to_github_issues.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
# 1. Install az devops and github cli
77
# 2. create a label for EACH work item type that is being migrated (as lower case)
88
# - ie: "user story", "bug", "task", "feature"
9-
# 3. add a tag to eaach work item you want to migrate - ie: "migrate"
10-
# - You can modify the WIQL if you want to use a different way to migrate work items, such as UNDER [Area Path]
9+
# 3. define under what area path you want to migrate
10+
# - You can modify the WIQL if you want to use a different way to migrate work items, such as [TAG] = "migrate"
1111

1212
# How to run:
13-
# ./ado_workitems_to_github_issues.ps1 -ado_pat "xxx" -ado_org "jjohanning0798" -ado_project "PartsUnlimited" -ado_tag "migrate" -gh_pat "xxx" -gh_org "joshjohanning-org" -gh_repo "migrate-ado-workitems" -gh_update_assigned_to $true -gh_assigned_to_user_suffix "_corp" -gh_add_ado_comments $true
13+
# ./ado_workitems_to_github_issues.ps1 -ado_pat "xxx" -ado_org "jjohanning0798" -ado_project "PartsUnlimited" -ado_area_path "PartsUnlimited\migrate" -gh_pat "xxx" -gh_org "joshjohanning-org" -gh_repo "migrate-ado-workitems" -gh_update_assigned_to $true -gh_assigned_to_user_suffix "_corp" -gh_add_ado_comments $true
1414

1515
#
1616
# Things it migrates:
@@ -40,7 +40,7 @@ param (
4040
[string]$ado_pat, # Azure DevOps PAT
4141
[string]$ado_org, # Azure devops org without the URL, eg: "MyAzureDevOpsOrg"
4242
[string]$ado_project, # Team project name that contains the work items, eg: "TailWindTraders"
43-
[string]$ado_tag, # only one tag is supported, would have to add another clause in the $wiql, eg: "migrate")
43+
[string]$ado_area_path, # Area path in Azure DevOps to migrate; uses the 'UNDER' operator)
4444
[string]$gh_pat, # GitHub PAT
4545
[string]$gh_org, # GitHub organization to create the issues in
4646
[string]$gh_repo, # GitHub repository to create the issues in
@@ -53,7 +53,7 @@ echo "$ado_pat" | az devops login --organization "https://dev.azure.com/$ado_org
5353
az devops configure --defaults organization="https://dev.azure.com/$ado_org" project="$ado_project"
5454
echo $gh_pat | gh auth login --with-token
5555

56-
$wiql="select [ID], [Title] from workitems where [Tags] CONTAINS '$ado_tag' order by [ID]"
56+
$wiql="select [ID], [Title] from workitems where [System.AreaPath] UNDER '$ado_area_path' order by [ID]"
5757

5858
$query=az boards query --wiql $wiql | ConvertFrom-Json
5959

0 commit comments

Comments
 (0)