octokat.js icon indicating copy to clipboard operation
octokat.js copied to clipboard

octo.fromUrl warns on query string params

Open ligaz opened this issue 9 years ago • 2 comments

It looks like fromUrl does not validate correctly query strings params. The following:

octo.fromUrl('https://api.github.com/user/repos?per_page=100&page=2')

outputs the validation warning:

BUG: Invalid Path. If this is actually a valid path then please update the URL_VALIDATOR. path=https://api.github.com/user/repos?per_page=100&page=2

ligaz avatar Dec 09 '16 16:12 ligaz

Ah yes, that is a limitation of the regular expression used to match a path; it should not prevent you from being able to use Octokat (just an annoying message).

Would it make sense to only include the message when running in development mode (process.env['NODE_ENV'] !== 'production')?

philschatz avatar Dec 13 '16 03:12 philschatz

Having this only for development sound great. Thanks.

ligaz avatar Dec 13 '16 08:12 ligaz