You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
Support team reviewers, or at least safely ignore non-User reviewers.
This is sufficient to fix it for me:
for revs in this_node["reviewRequests"]["nodes"]:
+ if revs["requestedReviewer"]:
reviewers.add(revs["requestedReviewer"]["login"])
reviewer_ids.add(revs["requestedReviewer"]["id"])
To Reproduce revup upload to create PR. Add a team reviewer to the PR via github UI. Attempt to run revup upload again.
Logs
Terminal output from the command. If possible, rerun the command with revup -v to get more verbose logs.
It's a private repo, so I can't point you at the PR, nor include the full logs. But this PR has a regular reviewer and a team reviewer - and I think the interesting bits of the logs are:
% revup -v upload[...] "reviewRequests": { "nodes": [ { "requestedReviewer": { "login": "joe_user", "id": "M...Q==" } }, { "requestedReviewer": null } ] },[...]Traceback (most recent call last): File "/Users/gus/bin/revup", line 8, in <module> sys.exit(_main()) File "/Users/gus/revup/lib/python3.10/site-packages/revup/__main__.py", line 17, in _main sys.exit(asyncio.run(main())) File "/opt/homebrew/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/opt/homebrew/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/Users/gus/revup/lib/python3.10/site-packages/revup/revup.py", line 357, in main return await upload.main( File "/Users/gus/revup/lib/python3.10/site-packages/revup/upload.py", line 46, in main await topics.query_github() File "/Users/gus/revup/lib/python3.10/site-packages/revup/topic_stack.py", line 961, in query_github ) = await github_utils.query_everything( File "/Users/gus/revup/lib/python3.10/site-packages/revup/github_utils.py", line 301, in query_everything reviewers.add(revs["requestedReviewer"]["login"])TypeError: 'NoneType' object is not subscriptable
The text was updated successfully, but these errors were encountered:
Describe the bug
revup
trips over PRs that have non-User (ie: team) reviewers.reviewRequests.requestedReviewer
can be a user or team. See https://docs.github.com/en/graphql/reference/unions#requestedreviewerExpected behavior
Support team reviewers, or at least safely ignore non-User reviewers.
This is sufficient to fix it for me:
for revs in this_node["reviewRequests"]["nodes"]: + if revs["requestedReviewer"]: reviewers.add(revs["requestedReviewer"]["login"]) reviewer_ids.add(revs["requestedReviewer"]["id"])
To Reproduce
revup upload
to create PR. Add a team reviewer to the PR via github UI. Attempt to runrevup upload
again.Logs
Terminal output from the command. If possible, rerun the command with
revup -v
to get more verbose logs.It's a private repo, so I can't point you at the PR, nor include the full logs. But this PR has a regular reviewer and a team reviewer - and I think the interesting bits of the logs are:
The text was updated successfully, but these errors were encountered: