daliusd / ghlite.nvim

Neovim plugin to work GitHub PRs quickly.
MIT License
39 stars 1 forks source link

get_pr_list "Attempt to decode a blank string" #3

Open justinmk opened 19 hours ago

justinmk commented 19 hours ago
  1. require('ghlite').setup{}
  2. :GHLitePRSelect
Error executing Lua callback: Vim:E474: Attempt to decode a blank string                                                                                                                                             
stack traceback:                                                                                                                                                                                                     
        [C]: in function 'parse'                                                                                                                                                                                     
        .../nvim/site/pack/paqs/start/ghlite.nvim/lua/ghlite/gh.lua:152: in function 'get_pr_list'                                                                                                                   
        ...e/pack/paqs/start/ghlite.nvim/lua/ghlite/pr_commands.lua:9: in function 'ui_selectPR'                                                                                                                     
        ...e/pack/paqs/start/ghlite.nvim/lua/ghlite/pr_commands.lua:32: in function <...e/pack/paqs/start/ghlite.nvim/lua/ghlite/pr_commands.lua:31>

Thanks for sharing your plugin. I've been looking for a minimal gh wrapper and I have hopes for this one :)

daliusd commented 19 hours ago

What gh pr list --json number,title,author,createdAt,isDraft,reviewDecision,headRefName,headRefOid,baseRefName returns when is executed from command line?

justinmk commented 19 hours ago

Oh, right :)

$ gh pr list --json number,title,author,createdAt,isDraft,reviewDecision,headRefName,headRefOid,baseRefName
HTTP 401: Bad credentials (https://api.github.com/graphql)
Try authenticating with:  gh auth login
daliusd commented 19 hours ago

I will need to handle scenarios like that somehow. At least user should know what has not worked.