pwntester / octo.nvim

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

Error when trying to check out a PR branch #280

Closed witoszekdev closed 2 years ago

witoszekdev commented 2 years ago

Issue Description

Type: bug report

Describe what happened (or what feature you want)

When trying to use <C-o> shortcut to checkout into PR branch it results in an error:

5108: Error executing lua ...lugged/octo.nvim/lua/octo/pickers/telescope/provider.lua:249: attempt to index field 'pull_request' (a nil v
alue)                                                                                                                                     
stack traceback:                                                                                                                          
        ...lugged/octo.nvim/lua/octo/pickers/telescope/provider.lua:249: in function 'key_func'                                           
        ...k/.vim/plugged/telescope.nvim/lua/telescope/mappings.lua:242: in function 'execute_keymap'                                     
        [string ":lua"]:1: in main chunk  

Describe what you expected to happen

It should checkout into the PR branch

How to reproduce it (as minimally and precisely as possible)

  1. Type :Octo pr list
  2. Select a PR
  3. Press <C-o>

https://user-images.githubusercontent.com/4144459/162739716-a7abe010-dec6-46da-8403-1c21bcba9973.mp4

Tell us your environment

macOS

NVIM v0.6.1 Build type: Release LuaJIT 2.1.0-beta3

gh version 2.7.0 (2022-03-30)

Tested on repo: https://github.com/saleor/saleor-dashboard Vim configuration: https://github.com/taniotanio7/dotfiles/tree/main/.config/nvim

Anything else we need to know?

pwntester commented 2 years ago

Thanks for reporting, can you check if https://github.com/pwntester/octo.nvim/commit/3a75706ec3e915ed11579961886afeed662565a9 fixes it for you?

witoszekdev commented 2 years ago

Yes! It worked. Thanks for help :)