-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Unable to assign issues to myself via --add-assignee @me
or --add-assignee USERNAME
#6235
Comments
Hi, thank you for reporting. GitHub CLI resolves your username to an assignee ID by doing a lookup in the context of "assignable users". I was able to pull down the list of assignable users for this repository, which is massive, and indeed your username isn't among them: # warning: slow
gh api graphql -f query='query($endCursor:String){repository(owner:"azure",name:"enterprise-scale"){assignableUsers(first:100,after:$endCursor){nodes{login}pageInfo{endCursor,hasNextPage}}}}' --paginate --jq '.data.repository.assignableUsers.nodes[].login' | tee assignable-azure.txt I think resolving usernames through Ref. #4876 |
Thanks for getting back to me @mislav. Im an admin on this repo and can be assigned issues manually in the web interface? I do agree on your proposal though and am happy to test when there is a release available, just let me know Thanks Jack |
I suppose this issue has already been solved. It seems that version with the head of branch |
@Shion1305 Not exactly. This feature works properly for small organizations but still does not work for large ones with many |
+1 @samcoe - Any updates on the WIP PR. We are also experiencing this issue with our issue automation on Azure/bicep-registry-modules |
Also +1 this. Happened to me in the bicep-registry-modules project that @ChrisSidebotham posted above. |
+1, also Bicep registry repo |
…e to GH bug (#1118) When a module issue is raised, the workflow should automatically assign the owner to it. Unfortunately due to a bug in GH, see cli/cli#6235, the GH handle is sometimes not found. As a workaround, the owner will then in this case be @mentioned in a comment.
…e to GH bug (Azure#1118) When a module issue is raised, the workflow should automatically assign the owner to it. Unfortunately due to a bug in GH, see cli/cli#6235, the GH handle is sometimes not found. As a workaround, the owner will then in this case be @mentioned in a comment.
Opened GH Support ticket to track this also |
@ChrisSidebotham : Let me catch you up but the short of it is that
Is this something you might be able to contribute? |
Hi @andyfeller - I could try look or find someone with a suitable skillset, @jtracey93 for awareness. |
@ChrisSidebotham If no one on your side is assigned to it, I'm willing to work on it. I had a look, and a lot can be reused from |
@wingleung - If you can contribute that would be great - we are struggling to find availability currently |
@samcoe I revived I think this PR could already be tested for this ticket. |
I can always test where needed! |
@ChrisSidebotham great! 🙏 the test case before merge would be:
|
I think I have an assumption, @jtracey93 is it possible that you need to be added to the microsoft/azure organisation in github? when I do a query with
if that's not it, I think we need to add admins to the |
Azure/bicep-registry-modules#1906 @wingleung - This looks to have resolved our pagination problem against the assignable users? |
@ChrisSidebotham thank you for testing! The tool does pagination to get all the assignable users 👉 https://github.com/cli/cli/blob/trunk/api/queries_repo.go#L1107-L1119. This is a slow query but it doesn't mean it's the core cause of this bug. The repo you tested on (
As mentioned in #6235 (comment) the user just isn't defined in the assignable user list. So the question is why certain users are not included in the assignable users list, maybe there is something missing or overwriting in the syncing between the azure organisation and github? I don't have access to the internals of github's graphql, so if the issue is not resolved I think we'll need someone from github to take a further look at this from the internal side @andyfeller. To be sure about the fix, I think we should explore some more test cases if you (or your team) can make some time 😄 🙏 Test case: reproducible error
Test case: fix
Test case: same flow but in interactive mode
It's possible I'm missing some information because I don't have insights into that ticket |
Describe the bug
Unable to assign issues to myself via
--add-assignee @me
or--add-assignee USERNAME
gh version 2.15.0 (2022-09-06)
Steps to reproduce the behavior
gh issue edit https://github.com/Azure/Enterprise-Scale/issues/1035 --add-assignee '@me'
'jtracey93' not found
gh issue edit https://github.com/Azure/Enterprise-Scale/issues/1035 --add-assignee 'jtracey93'
'jtracey93' not found
gh issue edit https://github.com/Azure/Enterprise-Scale/issues/1035 --add-assignee 'anotherUserNameThatsNotMe'
Expected vs actual behavior
Able to assign issues to myself via gh cli
The text was updated successfully, but these errors were encountered: