Skip to content
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

Malformed repo names produces a misleading error in the GitHub importer #187

Open
grahamc opened this issue Apr 12, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@grahamc
Copy link

grahamc commented Apr 12, 2022

Assume a GitHub organization named foo which owns a repository named bar.

Entering a malformed repo name like bar, instead of the full foo/bar like this:

? From which repo do you want to import issues from (e.g. "facebook/react") bar

produces an infinite stream of the following error:

Error: Unable to find repo bar/undefined. Did you select `repo` scope for your GitHub token?
    at GithubImporter.<anonymous> (/nix/store/y9r60ar88lwq6a21q0ff7qnvl4ch0gb2-linear-import/share/importer/dist/cli.js:409:31)
    at Generator.next (<anonymous>)
    at fulfilled (/nix/store/y9r60ar88lwq6a21q0ff7qnvl4ch0gb2-linear-import/share/importer/dist/cli.js:69:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

I did grant the repo scope. It strikes me that the import tool could detect that the string I entered was parsed as the org name and that the repo name is undefined, and produce a nicer error.

@grahamc grahamc changed the title Malformed repo names produces a misleading error Malformed repo names produces a misleading error in the GitHub importer Apr 12, 2022
@pacocoursey
Copy link
Member

Hey, this seems like a valid bug but I'm curious why you'd enter just bar when the example text clearly shows the <org>/<repo> format? (facebook/react)

@pacocoursey pacocoursey added the bug Something isn't working label Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants