Skip to content

upgrade to support projects v2, resuming previous runs#7

Open
Liam-Deacon wants to merge 2 commits intojoshjohanning:mainfrom
Liam-Deacon:v2projects-update-and-resume-sync
Open

upgrade to support projects v2, resuming previous runs#7
Liam-Deacon wants to merge 2 commits intojoshjohanning:mainfrom
Liam-Deacon:v2projects-update-and-resume-sync

Conversation

@Liam-Deacon
Copy link

@Liam-Deacon Liam-Deacon commented Nov 24, 2023

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 Use issue migration api #6 )

@ehrnst
Copy link

ehrnst commented Feb 6, 2024

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

@joshjohanning
Copy link
Owner

joshjohanning commented Nov 13, 2024

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 :(

…r related functions

backing up from old machine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants