Skip to content

fix: handle null author field for deleted GitHub accounts#381

Closed
Grizouforever wants to merge 1 commit intoentrius:testfrom
Grizouforever:fix/clean-null-author
Closed

fix: handle null author field for deleted GitHub accounts#381
Grizouforever wants to merge 1 commit intoentrius:testfrom
Grizouforever:fix/clean-null-author

Conversation

@Grizouforever
Copy link
Copy Markdown

Summary

  • Replace direct pr_raw['author']['login'] access with (pr_raw.get('author') or {}).get('login', 'ghost') in classes.py and github_api_tools.py
  • Prevents KeyError/TypeError crashes when a PR author's GitHub account has been deleted

Related Issues

Fixes #366

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Testing

  • Tests added/updated
  • Manually tested

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

cc @anderdc @LandynDev for review

Use safe null checks for pr_raw['author'] to avoid KeyError/TypeError
when a PR author's account has been deleted on GitHub. Replace direct
dict access with (pr_raw.get('author') or {}).get('login', 'ghost')
in both classes.py and github_api_tools.py.
@anderdc anderdc closed this Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: TypeError crash when PR author is a deleted GitHub account (ghost user)

2 participants