-
Notifications
You must be signed in to change notification settings - Fork 85
fix: TypeError when processing pull requests with ghost users #585
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
Conversation
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a TypeError that occurs when processing pull requests containing ghost users (deleted GitHub accounts). The error happens when the github3 library attempts to access repository owner information that is None for deleted accounts.
- Wraps the problematic
pull_request()
call in a try-catch block to handle TypeError exceptions - Adds comprehensive test coverage for the ghost user scenario
- Follows the established error handling pattern used elsewhere in the codebase
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
issue_metrics.py | Adds try-catch error handling around pull_request() call to gracefully handle ghost user scenarios |
test_issue_metrics.py | Adds comprehensive test case to verify proper handling of TypeError when processing pull requests with ghost users |
@copilot can you fix this issue There's inconsistent spacing in the comment. The # type:ignore comment should have a space after the colon: # type: ignore. |
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
# type: ignore
comments to be consistent with code style💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.