Skip to content

IssueComment fails for bot users #3364

@arash77

Description

@arash77

Description:

After upgrading PyGithub to 2.8.0, IssueComment.user is no longer deserialized for bot accounts. This causes BadAttributeException when trying to access the comment.

Repro:

from github import Github

g = Github("token")
repo = g.get_repo("owner/repo")
pr = repo.get_pull(1234)

comments = pr.get_issue_comments()
print(comments[0])            # crashes if comment is from a bot

Traceback:

github.GithubException.BadAttributeException: (
  {'login': '...[bot]', 'type': 'Bot', ...},
  <class 'type'>,
  None
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions