Skip to content

GHIssue returned by searchIssues API has null owner field #497

@blindpirate

Description

@blindpirate

Context

searchIssues API returns a list of GHIssues but these GHIssues has null owner field. If anyone tries to invoke further API on these GHIssue (say, comment API), NPE will be thrown.

Reproduction

List<GHIssue> issues = gitHub.searchIssues().q("repo:gradle/gradle").list().asList();
issues.get(0).getComments();

throws NPE.

Workaround

Use reflection to set owner for the issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions