poutine icon indicating copy to clipboard operation
poutine copied to clipboard

Make `--scm-base-url` more fool-proof

Open fproulx-boostsecurity opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

When using --scm-base-url to specify self hosted platform the fact it's called url makes me put a URL prefix, but it takes the domain at the moment. We should make that more fool-proof and accept both without complaining.

$ poutine --scm gitlab --scm-base-url https://gitlab.corp.org/ --token SNIP analyze_org my-group

11:08AM | ERROR | error="failed to analyze org my-group: failed to get batch of repos: Get \"https://https//gitlab.corp.org/api/v4/groups/my-group/projects?archived=false&include_subgroups=true&page=1&per_page=100\": dial tcp: lookup https: no such host"
exit status 1

Describe the solution you'd like

Accepting either a domain gitlab.corp.org or https://gitlab.corp.org (with or without trailing slash)

fproulx-boostsecurity avatar May 24 '24 15:05 fproulx-boostsecurity