-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting "Error fetching repo, json decoding error" when running running GHOpenPR
from a private repo
#8
Comments
Does the status bar leave any clue as to where it fails? We log out each step while its occuring |
@timtyrrell are you using the latest plugin? I'm not seeing anywhere I log "Error fetching repo"
|
Okay I think I know what the issue here is.
Neovim's json decoding doesn't know how to deal with this. So when large requests are made that trigger a pagination, the decoder gets a stream and it crashes. For now, I'll remove the pagination flags from the CLI, but we won't be retreiving all possible data. I made a comment on an issue here which would be the ideal fix: cli/cli#1268 (comment) I think we can also whip up a poor-mans pagination function which just does "keep requesting data until the array I recieve is empty". But that's assuming the GH API returns empty arrays when the offset requests are larger then the number of items that could be returned. Tho, i guess if it errors hopefully it errors with a specific value and we can catch for it. |
Latest commit should at least get everything working for now. I'll start to see how we can paginate requests to get all the data. |
@ldelossa just tried, I was able to get a PR open now 👍 |
awesome. we'll keep this issue open until pagination is figured out. |
@timtyrrell you can try this branch out, right now there should be a debug log that shows its paginating any resources that return 100 items. https://github.com/ldelossa/gh.nvim/pull/12/files This isn't done for review threads yet, pagination in GraphQL seems really annoying... so I'm gonna look at that a bit later. |
Closing this out, pagination is implemented at this point. |
On neovim 0.7 release, the PR list opens with a few PRs but when I select one it appears to fail somewhere in the process. Is there a way to enable more logging, in case that would help?
Also, when I selected a PR later:
"A pull request is already opened, close it and open pull #685?" and say "yes", I the error below:
Not sure if the last one was related to already being on the PR branch or not.
From this reddit thread
The text was updated successfully, but these errors were encountered: