-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADO to GitHub - ADO Work Item links #1228
Comments
I was able to reproduce this. It looks like GEI is generating links in the PR description back to the AzDO work items, but the format of the link is not what the AzDO Boards <-> GitHub Integration expects. If the link format in the GH PR was |
Thanks @dylan-smith and @ArinGhazarian for your input. Ive had a look but don't see where its putting those PR comments in. I assume it happens inside the GitHub CLI migration logic? I did try to see if I could work around this limitation by querying all the PRs in GitHub and then calling ADO REST APIs to add a link to the GitHub PR, but from the ADO side its not possible to programmatically patch work items with a GitHub link due to that being controlled by the ADO GitHub app (which has a token for the connection to GitHub). https://github.com/github/gh-gei/blob/main/src/ado2gh/Commands/ConfigureAutoLink/ConfigureAutoLinkCommandHandler.cs looks like it runs after the migration of the repo in order to configure the auto link for future PRs right? So I don't think modifying/adding to that would help unless I'm wrong. Is this an issue that needs to be raised against the GitHub CLI itself? |
👋 @WillEllis, Yes, this needs to be fixed in the backend since the actual repo migration happens in the GEI backend and the CLI just initiates it. I will create an issue to address this. |
Thanks @ArinGhazarian. In the meantime if anyone else has this issue, I have managed to work around this limitation right now by writing a script that after migration goes through all the migrated repos PRs, finds any that have "AzureDevOps/#" in the body and updates that piece of text to be "AB#". As pointed out by Dylan above, this is what the Azure Boards integration is expecting and it then does its thing and links all the PRs so they show in the ADO work items correctly. |
Hi @WillEllis, can you share this script? |
Description
I've performed a trial run of migration from Azure DevOps Repos to GitHub and have a query around Work Item links. According to https://docs.github.com/en/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/about-migrations-from-azure-devops-to-github-enterprise-cloud#data-that-is-migrated
Work items links on pull requests are migrated. This is a pretty key feature as we have many pull requests with the linked to many different work items with Azure DevOps Boards.
However when I ran the test work items ended up like this:
The pull request not found here is because ado2gh has disabled the ADO repo. But with the Work item links on PRs being migrated to me implies I should see GitHub PR links on this work item, like https://learn.microsoft.com/en-gb/azure/devops/boards/github/link-to-from-github?view=azure-devops#view-or-open-links-from-the-development-section
I've poked around a bit but cant see what I may have done wrong. Is this an issue with the migrator?
Reproduction Steps
The text was updated successfully, but these errors were encountered: