Skip to content

Commit

Permalink
github: Don't crash if github bot is a reviewer
Browse files Browse the repository at this point in the history
Bots apparently don't have a "login" field.

Topic: ghbot
Fixes: #178
  • Loading branch information
jerry-skydio committed Jul 2, 2024
1 parent 93e877a commit e96542d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion revup/github_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ async def query_everything(
reviewers.add(revs["requestedReviewer"]["login"])
reviewer_ids.add(revs["requestedReviewer"]["id"])
for revs in this_node["latestReviews"]["nodes"]:
if not revs["viewerDidAuthor"]:
# Ignore self reviews and bot reviews (without a login)
if not revs["viewerDidAuthor"] and "login" in revs["author"]:
reviewers.add(revs["author"]["login"])
reviewer_ids.add(revs["author"]["id"])
for user in this_node["assignees"]["nodes"]:
Expand Down

0 comments on commit e96542d

Please sign in to comment.