Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 2, 2025

  • Initial implementation to handle TypeError for ghost users in pull request processing
  • Added comprehensive test case for ghost user scenario
  • Fixed spacing in # type: ignore comments to be consistent with code style
  • All tests passing and linting checks clean

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] TypeError: 'NoneType' object is not subscriptable Fix TypeError when processing pull requests with ghost users Sep 2, 2025
@Copilot Copilot AI requested a review from zkoppert September 2, 2025 23:49
Copilot finished work on behalf of zkoppert September 2, 2025 23:49
@zkoppert zkoppert changed the title Fix TypeError when processing pull requests with ghost users fix: TypeError when processing pull requests with ghost users Sep 3, 2025
@github-actions github-actions bot added the fix label Sep 3, 2025
@zkoppert zkoppert marked this pull request as ready for review September 3, 2025 04:32
@zkoppert zkoppert requested a review from a team as a code owner September 3, 2025 04:32
@Copilot Copilot AI review requested due to automatic review settings September 3, 2025 04:32
Copy link
Contributor

@Copilot Copilot AI left a 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 finished work on behalf of zkoppert September 3, 2025 04:36
@zkoppert
Copy link
Member

zkoppert commented Sep 3, 2025

@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>
Copy link
Contributor Author

Copilot AI commented Sep 3, 2025

@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.

Fixed the spacing in the # type: ignore comments to include the proper space after the colon. Updated in commit cbda2ec.

Copilot finished work on behalf of zkoppert September 3, 2025 04:47
@zkoppert zkoppert merged commit 4e16ea9 into main Sep 3, 2025
40 checks passed
@zkoppert zkoppert deleted the copilot/fix-584 branch September 3, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants