Open renan-alm opened 2 months ago
The confusion was sorted out with my colleagues.
In short, I was using the team name on the parameter "--ado-team-project". But this parameter is meant to have the ADO project instead. So it wasn't evident (to me).
Perhaps this bug can be converted to a refactoring removing the word "team" from the parameter.
In ADO they used to be called "Team Projects". However, I just did a quick look and ADO seems to have changed how they refer to them at some point from "Team Projects" to just "Projects". So renaming our arg may be something we want to consider (but it would be a bit more work than a simple rename because it would be a breaking change).
There is another backlog item that may have helped avoid confusion here also: https://github.com/github/gh-gei/issues/992
Description
After creating a repo in ADO, the repo URL looks like this
https://dev.azure.com/<ADO_ORG>/_git/<ADO_REPO>
.However, ado2gh cli seems to expect the team name to be part of the repo URL, such as:
https://dev.azure.com/<ADO_ORG>/<ADO_TEAM>/_git/<ADO_REPO>
The URL returned in the error message (containing the team name) does not exist and the command fails with "source repository does not exist or you do not have permissions".
Unfortunately the cli forces the parameter
--ado-team-project
to be specified. Then even if I specify an empty string''
, the result is stillhttps://dev.azure.com/<ADO_ORG>//_git/<ADO_REPO>
which is even more incorrect.Reproduction Steps
Assuming you have admin on both ADO and GH, and PATs for both tools loaded on the env vars:
gh ado2gh migrate-repo --ado-org <ADO_ORG> --ado-repo <ADO_REPO> --github-org <GH_ORG> --github-repo <GH_REPO_NAME> --ado-team-project <ADO_TEAM_NAME>
Error msg: