gh-gei icon indicating copy to clipboard operation
gh-gei copied to clipboard

`--ghes-api-url` is not validated for basic correctness when running `gh gei generate-script`

Open timrogers opened this issue 3 years ago • 1 comments

Description

When specifying the --ghes-api-url option with generate-script to prepare a GHES ➡️ GHEC migration, the URL is not validated for basic correctness.

A badly typed or badly copy-and-pasted URL will cause the process to blow up, but you have to look at the logs to find out why.

We could instead validate the URL before trying to make any API requests and return a clear, explicit error message if it fails basic validity checks.

Reproduction Steps

Run gh gei generate-script with the --ghes-api-url option set to an obviously invalid URL (e.g. missing a : separating the schema from the host)

timrogers avatar Sep 12 '22 16:09 timrogers

This could also be considered a feature requests rather than a bug, but depends on how we think about this 😊

timrogers avatar Sep 12 '22 16:09 timrogers