Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ghProjectCard.content.repository is null #1097

Copy link
Copy link
Closed
@JLLeitschuh

Description

@JLLeitschuh
Issue body actions

Describe the bug
A clear and concise description of what the bug is.

Try to call getRepository on an issue instantiated from a getContent call on a GHProjectCard throws an NPE.

val gitHub = GitHubBuilder.fromPropertyFile().build()
println(gitHub.myself)
val project = gitHub.getOrganization(organization).listProjects().single { it.number == projectNumber }
val issues = project.listColumns().flatMap { ghProjectColumn ->
    println("Scanning column: ${ghProjectColumn.name}")
    ghProjectColumn.listCards().mapNotNull { ghProjectCard ->
        ghProjectCard.content?.run {
            SecurityBoardIssue(
                title = title,
                dateCreated = createdAt,
                column = ghProjectColumn.name,
                repository = repository.name // throws NPE
            )
        }
    }
}

Expected behavior

Should be able to determine the repository that a project card originates from.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.