Closed HampusMat closed 8 months ago
What is the output of gh auth status
, specifically the scopes line? We are now doing parsing to figure out which scopes you have to determine if we should or shouldn't show project v2 stuff and the line that the error is occurring is where we use the regex match
Also, what is your gh
version? I happen to have 2.41.0, which is not the most recent but it's pretty darn close (only one release old, from last week)
If you happen to have an out-of-date gh
then a workaround is to just update it. Long term some error handling should get added here in the event that the scopes go away from the output for whatever reason (which I can submit a PR for later tonight)
@HampusMat I just pushed a small change up https://github.com/pwntester/octo.nvim/pull/481
Can you verify if that helps for you?
@HampusMat I just pushed a small change up #481
Can you verify if that helps for you?
I had the same issue, and it works for me now. In my case, it may have been because I needed to update GH CLI. I updated and got it to work right around the same time you pushed that change, so I'm not sure what did it but thank you! 🤷
Fixes the original error for me as well, but now there's a message on nvim startup saying Cannot request projects v2, missing scope 'read:project'
which seems to be a GH permissions related message that I wasn't getting before.
Yep. That's expected. The most recent changes added projects v2 support, which requires the read:project
scope on your token.
You can suppress this warning by setting the following in your config
{
suppress_missing_scope = {
projects_v2 = true,
}
}
Edit: typos
Thank you all! Just merged the fix
Great! I will try it out
It works :tada:
Yep. That's expected. The most recent changes added projects v2 support, which requires the
read:proejct
scope on your token.You can suppress this warning by setting the following in your config
{ suppress_missing_scope = { project_v2 = true, } }
For those who are still reading this comment, it should be projects_v2
.
Issue Description
Type: bug report
Describe what happened (or what feature you want)
When Neovim starts it displays the following error
and the
Octo
command is not available.Describe what you expected to happen
For no error to be displayed and for Octo to work.
How to reproduce it (as minimally and precisely as possible)
1. Add the following to your Neovim config file
PackerCompile
PackerInstall
Tell us your environment
NVIM v0.9.5 Build type: Release LuaJIT 2.1.1702233742 Github CLI 2.42.0 Artix Linux
Anything else we need to know?
This is 100% caused by some commit in #477. I tried using the commit before the pull request was merged (c6b008434d684e746a40e443876b646b521cebbf) and the problem doesn't occur.