question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GHProjectCard return null on getContent()

See original GitHub issue

Describe the bug I need a issue list from a project column. The implementation is in a jenkins shared library. It’s easy to use. Unfortunately I get an error. See this Code. github-api is included as a dependency with version 1.122

To Reproduce

import ....
final GitHub github = GitHub.connectToEnterpriseWithOAuth('https://github.enterprise.com/api/v3', null, 'usertoken123')
final GHProjectColumn projectColumn = github.getProjectColumn(12345)
projectColumn.listCards().each { projectCard ->
   echo """
ProjectCard: ${projectCard}
ContentUrl: ${projectCard.getContentUrl()}
Content: ${projectCard.getContent()}
"""
    GHIssue issue = projectCard.getContent()
   // issue must not be null
}

https://github.com/hub4j/github-api/blob/8e6dbf37724cd76096b339ea7399fd49d06b49cb/src/main/java/org/kohsuke/github/GHProjectCard.java#L120

Expected behavior projectCard.getContent() return the existing issue object or a helpful error message.

Desktop (please complete the following information):

  • OS: unimportant
  • Browser unimportant
  • Version 1.122

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
bitwisemancommented, Dec 7, 2021

@km2018 I’ll see if I can find time to create an example for you later today.

1reaction
bitwisemancommented, Dec 7, 2021

@km2018 Invitation sent.

Read more comments on GitHub >

github_iconTop Results From Across the Web

imap getContent() returns null - Oracle Communities
I am able to read the Message meta data. But not the mail body. If i use getContent() it gives nullPointerException. Any idea...
Read more >
URLConnection getContent() return null - Stack Overflow
I had a similar problem: While InputStream stream = (InputStream) url.getContent() works well on Android 4+, Android 2.2 did return null ...
Read more >
is this Bug in getContent() PageReference function?
Here, I getEmpty PDF file, since the Query in MyVFPDF page's extention class' contructor is returning Null value, i.e. No Record, but same...
Read more >
Urlconnection Getcontent() Return Null With Code Solution
The getErrorStream() is the method of HttpURLConnection class. This method is used to get an error stream if the connection is disconnected. How...
Read more >
DownloadHandlerAssetBundle.GetContent returns null for ...
I don't understand the comment about avoiding caching. If you don't want the caching, don't pass the extra arguments to GetAssetBundle(), only ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found