octo.nvim
octo.nvim copied to clipboard
"User not found" when adding a organisation team as a PR reviewer
Issue Description
Type: bug report/feature request
Describe what happened (or what feature you want)
This could be treated as either a bug or a feature request, probably more of a feature request!
I'd like to be able to add a team from my org as a PR reviewer. I tried with Octo reviewer add org/team but currently I get "User not found". I ran the graphql command and got the same result.
Maybe we could check if the login matches the form org/team, split it into two variables and then use the following query to grab the team ID:
query {
organization(login:"<org>") {
teams(first: 1, query:"<team>") {
edges {
node {
id
}
}
}
}
}
Describe what you expected to happen
Team added successfully as a reviewer.
How to reproduce it (as minimally and precisely as possible)
- Create a PR with
Octo pr createin an org project - Try to add a team as a reviewer with `Octo reviewer add org/team
Tell us your environment
Arch Linux
Linux orion 5.17.5-zen1-1-zen #1 ZEN SMP PREEMPT Wed, 27 Apr 2022 20:56:14 +0000 x86_64 GNU/Linux
NVIM v0.8.0-dev+126-g95b7851f6
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Anything else we need to know?
Don't think so!
Thanks for the report. Im currently working on some other issues, but will implement this afterwards. PRs are welcome too!