Closed catgoose closed 2 years ago
Weird, I thought I replied to this one. My concern was that for correct identification of the aliases, we need to parse the ssh config file which is out of the scope of this plugin. Unless there is a different way Im not familiar with
I’m not sure why, but gh.nvim and lazygit work fine in directories with aliases. Is there no way to define aliases in the lua setup function?
Please try https://github.com/pwntester/octo.nvim/commit/bd6af73919e36783c160271217536ef065e2967b and let me know if it works for you
packer.nvim config:
config = function()
require("octo").setup({
ssh_aliases = {
["github.com-work"] = "github.com",
},
})
end,
When issuing :Octo issue create, I receive this error:
Creating issue in work/closing-punchlist. Enter title: test
Do you want to use the content of the current buffer as the body for the new issue?
E5108: Error executing lua Vim:E474: Attempt to decode a blank string
stack traceback:
[C]: in function 'json_decode'
...nvim/site/pack/packer/start/octo.nvim/lua/octo/utils.lua:363: in function 'get_repo_id'
...m/site/pack/packer/start/octo.nvim/lua/octo/commands.lua:666: in function 'create_issue'
...m/site/pack/packer/start/octo.nvim/lua/octo/commands.lua:23: in function 'a'
...m/site/pack/packer/start/octo.nvim/lua/octo/commands.lua:331: in function 'octo'
[string ":lua"]:1: in main chunk
Press ENTER or type command to continue
also :Octo issue list returns
error connecting to github.com-work
check your internet connection or https://githubstatus.com
gh issue list
in that same directory returns issues, however.
Please try again, user config was not being applied
Thanks, it works now. I really appreciate that!
Initially I tried gh.nvim, but it cannot create issues. Thanks again :)
Weird, I thought I replied to this one. My concern was that for correct identification of the aliases, we need to parse the ssh config file which is out of the scope of this plugin. Unless there is a different way Im not familiar with
I replied in https://github.com/pwntester/octo.nvim/issues/295 sorry, I though it was the same issue
At work I use my personal github account and one for my organization.
my ~/.ssh/config
.git/config for a personal repo
.git/config for work related repo
Is there any way for octo to work for the work related git repos that use git@github.com-work? I can change it to git@github.com, but then lazygit nvim plugin stops working.
Thank you.