Octo review start fails with large pull requests
Issue Description
bug report
Describe what happened (or what feature you want)
When opening large pull requests :Octo review start fails with:
Error executing vim.schedule lua callback: Vim:E474: Trailing characters: [{"additions":11,"blob_url":"https://github.com/******/*****/blob/81b56f1be49c867d3274c60ce6a93626524cf496/packages%2Fui%2Ficons%2FDribble.tsx","changes":11,"contents_url":"https://api.github.com/repos/s
napnhd/snap-system/contents/packages%2Fui%2Ficons%2FDribble.tsx?ref=81b56f1be49c867d3274c60ce6a93626524cf496","deletions":0,"filename":"packages/ui/icons/Dribble.tsx","patch":"@@ -0,0 +1,11 @@\n+export function DribbleIcon() {\n+ return (\n+ \u003csvg className=\"h-6 w-6\" fill=\
"currentColor\" viewBox=\"0 0 24 24\"\u003e\n+ \u003cpath\n+ fillRule=\"evenodd\"\n+ d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c5.51 0 10-4.48 10-10S17.51 2 12 2zm6.605 4.61a8.502 8.502 0 011.93 5.314c-.281-.054-3.101-.629-5.943-.271-.065-.141-.12-.293-.184-.445a25
.416 25.416 0 00-.564-1.236c3.145-1.28 4.577-3.124 4.761-3.362zM12 3.475c2.17 0 4.154.813 5.662 2.148-.152.216-1.443 1.941-4.48 3.08-1.399-2.57-2.95-4.675-3.189-5A8.687 8.687 0 0112 3.475zm-3.633.803a53.896 53.896 0 013
stack traceback:
[C]: in function 'json_decode'
...ack/packer/opt/octo.nvim/lua/octo/model/pull-request.lua:86: in function 'cb'
...nvim/site/pack/packer/opt/octo.nvim/lua/octo/gh/init.lua:92: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Describe what you expected to happen
It to start the pr review.
How to reproduce it (as minimally and precisely as possible)
- Create pr with over 100 file changes
- Run
:Octo review start
Tell us your environment
NVIM v0.7.0 Build type: Release LuaJIT 2.1.0-beta3 Compiled by linuxbrew@30f25fa6036f
Features: +acl +iconv +tui See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: " /home/linuxbrew/.linuxbrew/Cellar/neovim/0.7.0/share/nvim"
Anything else we need to know?
gh.nvim had a similar issue https://github.com/ldelossa/gh.nvim/issues/8
Thanks for reporting this, I can think of some workarounds piping the gh output into jq but I think its better to wait until gh implements array merging natively. This is actively being implemented so it should probably be released soon.
ref: https://github.com/cli/cli/pull/5652
Do we have a temporary workaround for this at the moment? @pwntester I think you hinted at one and it looks like the cli PR you mentioned is gaining activity again
Also experiencing this issue on large PRs
I'm my tests the json_decode does not accept big strings. Maybe will be necessary implement a paginator instead of use the gh pagination feature