pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor
MIT License
2.42k stars 136 forks source link

attempt to call field 'add_create' #191

Closed kkharji closed 3 years ago

kkharji commented 3 years ago

Trying to add a new label with default mapping <leader>lc results in the following error:

E5108: Error executing lua ...octo/mappings.lua:57: attempt to call field 'add_create' (a nil value)
kkharji commented 3 years ago

Same thing applies to trying to execute list issues from the same repo with <leader>li

E5108: Error executing lua octo/telescope/menu.lua:126: attempt to index local 'opts' (a string value)
kkharji commented 3 years ago

similar thing apply to reloading but goes into vim.shared

E5108: Error executing lua vim/shared.lua:64: s: expected string, got nil
stack traceback:
        vim/shared.lua:64: in function 'gsplit'
        vim/shared.lua:111: in function 'split'
        ...nvim/site/pack/packer/start/octo.nvim/lua/octo/utils.lua:608: in function 'split_repo'
        ...share/nvim/site/pack/packer/start/octo.nvim/lua/octo.lua:67: in function 'load'
        ...share/nvim/site/pack/packer/start/octo.nvim/lua/octo.lua:61: in function 'load_buffer'
        ...m/site/pack/packer/start/octo.nvim/lua/octo/commands.lua:944: in function 'reload'
        ...m/site/pack/packer/start/octo.nvim/lua/octo/mappings.lua:48: in function <...m/site/pack/packer/start/
octo.nvim/lua/octo/mappings.lua:47>
        ...m/site/pack/packer/start/octo.nvim/lua/octo/mappings.lua:9: in function 'on_keypress'
        [string ":lua"]:1: in main chunk
pwntester commented 3 years ago

Thanks for reporting this tami. Im currently out in vacations but will look into it when I come back

kkharji commented 3 years ago

np, I'll try to take a deeper look maybe tom.

Wish you a great vacation.

pwntester commented 3 years ago

Trying to add a new label with default mapping <leader>lc results in the following error:

E5108: Error executing lua ...octo/mappings.lua:57: attempt to call field 'add_create' (a nil value)

Mappings.lua 57 should call create_label instead. Sorry I dont use the mappings that much and they are not very well tested. If you send a PR I will merge asap

pwntester commented 3 years ago

Same thing applies to trying to execute list issues from the same repo with <leader>li

E5108: Error executing lua octo/telescope/menu.lua:126: attempt to index local 'opts' (a string value)

Mappings.lua 24 should call issues({repo = repo})

pwntester commented 3 years ago

similar thing apply to reloading but goes into vim.shared

The whole Commands.reload function can be replaced with vim.cmd [[e!]]