CSV parsing in `gh [gei|ado2gh|bbs2gh] reclaim-mannequin` rejects valid CSVs
Description
gh [gei|ado2gh|bbs2gh] reclaim-mannequin allows you to pass in a --csv of mannequins to reclaim, based on the template generated with gh [gei|ado2gh|bbs2gh] generate-mannequin-csv.
At the moment, this only works with CSVs that exactly match the template - for example, if you generate a CSV with the headers quoted (which is allowed in CSV files), it is rejected:
"mannequin-user","mannequin-id","target-user"
"tim","M_kgDOB65srg","timrogers"
This is because, when reading a provided CSV file, we effectively treat the input as text rather than parsing it as a CSV.
It's quite likely that you end up with quoted CSVs, for example if you build them programatically using PowerShell.
We should make the CSV parsing more tolerant.
Reproduction Steps
- Call
gh [gei|ado2gh|bbs2gh] reclaim-mannequin --csv, passing in a CSV like the example above
We should follow the same pattern for csv parsing that we do for ado2gh migrate-repo --repo-list repos.csv
https://github.com/github/gh-gei/blob/main/src/ado2gh/Services/AdoInspectorService.cs#L41