Hi folks. I have a few git global configs that rewrite URLs so I can use a shorter command like git clone github:owner/repo to clone repos. Because of the https://github.com/pwntester/octo.nvim/blob/master/lua/octo/utils.lua#L149 the returned value from git config --get remote.origin.url is github:owner/repo instead of git@github.com:owner/repothis causes an error when I try to run Octo pr list. gh: Could not resolve to a Repository with the name 'nil/nil'.
Describe what you expected to happen
One possible solution is to change the command to local cmd = string.format("git remote get-url %s", candidate) or add another else if statement that can support alias:owner/repo pattern.
How to reproduce it (as minimally and precisely as possible)
Issue Description
Type: feature request/bug report
Describe what happened (or what feature you want)
Hi folks. I have a few git global configs that rewrite URLs so I can use a shorter command like
git clone github:owner/repo
to clone repos. Because of the https://github.com/pwntester/octo.nvim/blob/master/lua/octo/utils.lua#L149 the returned value fromgit config --get remote.origin.url
isgithub:owner/repo
instead ofgit@github.com:owner/repo
this causes an error when I try to runOcto pr list
.gh: Could not resolve to a Repository with the name 'nil/nil'.
Describe what you expected to happen
One possible solution is to change the command to
local cmd = string.format("git remote get-url %s", candidate)
or add anotherelse if
statement that can supportalias:owner/repo
pattern.How to reproduce it (as minimally and precisely as possible)
git config --global url."git@github.com:".insteadOf "github:"
git clone github:pwntester/octo.nvim
Tell us your environment
NVIM v0.7.0-dev+674-g24f9463dd-dirty MacOS Montrey 12.0.1 gh version 2.4.0 (2021-12-21)
Anything else we need to know?
Just let me know if you want a PR for that. Thank you!