ado_workitems_to_github_issues icon indicating copy to clipboard operation
ado_workitems_to_github_issues copied to clipboard

upgrade to support projects v2, resuming previous runs

Open Liam-Deacon opened this issue 2 years ago • 2 comments

Summary

Updates the script to handle GitHub Projects V2 boards and more advanced configuration and resume capabilities.

Details

Changes were made for the following:

  1. Configurable explicit mapping of azure devops entities to github equivalents via config (JSON), notably:
    • work item type to label
    • tags to labels
    • user email to github username
    • work item state to github projects v2 column
  2. Support for resuming previous migration
    • Ability to map ADO URLs to Github Issues
    • Attempt to match ADO items to Github Issues based on titles
      • Deduplication attempt based on first matching issue, see all matches with -Debug CLI option
  3. Mentioning of parent issues from child issues during migration
  4. Added shield.io badges to migration comment for ADO relations
  5. Added collapsed relations table in comment
  6. Support for github milestones (using ADO iterations)
  7. Ability to automatically create milestones and labels using gh CLI
  8. Support unicode in objects returned from az devops or gh CLI such as labels
  9. Workaround rate limits (identified in #6 )

Liam-Deacon avatar Nov 24 '23 17:11 Liam-Deacon

Is this being migrated? I about to do the move fro ADO to GH and would be great to have these latest updates

ehrnst avatar Feb 06 '24 13:02 ehrnst

It looks like this requires some work to get up to snuff (obviously super late PR review on my part).

I am using

$ pwsh --version                                                                                                                                                       
PowerShell 7.4.6

I am writing this for myself for later on things I have found:

  1. Can no long use [bool] for params since PowerShell 6+ is more strict. Can use [System.ComponentModel.DefaultValueAttribute($false)] instead of [bool], or just use [switch] instead

ado_workitems_to_github_issues.ps1: Cannot process argument transformation on parameter 'gh_update_assigned_to'. Cannot convert value "System.String" to type "System.Boolean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or 0.

  1. In the code, functions are referenced before they appear in the code:

Get-GitHubRepoInfo: /Users/joshjohanning/Repos/ado_workitems_to_github_issues-Liam-Deacon/ado_workitems_to_github_issues.ps1:196:48 Line | 196 | … [GithubRepository]$githubRepositoryInfo = (Get-GitHubRepoInfo -org $g … | ~~~~~~~~~~~~~~~~~~ | The term 'Get-GitHubRepoInfo' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

  1. gh projects cli changed, instead of gh projects list --org abc it's gh project list --owner abc
  2. There are curl.exe references that obviously won't work on my MacOS :(

joshjohanning avatar Nov 13 '24 22:11 joshjohanning