You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once I authenticate to GitHub with a valid access token, but then attempt to pull the Map of Gists using this method:
gitHub.getMyself().listGists();
It will give me a map of GHGist objects and their gistId's, but when I then use the GHGist object to pull the files out of Gist, the file data comes back null.
Edit:
Here is some test code with the output if it helps:
System.out.println("GistID's from GHGist objects:");
for (GHGist ghGist : gitHub.getMyself().listGists().toList()) {
System.out.println("\t"+ghGist.getGistId());
}
System.out.println("\nFrom the same GHGist objects, here is the data that their GHGistFile objects contain:\n\nFilename: Content");
for (GHGist ghGist : gitHub.getMyself().listGists().toList()) {
for(GHGistFile ghGistFile : ghGist.getFiles().values()) {
System.out.print("\t"+ghGistFile.getFileName()+": ");
System.out.println(ghGistFile.getContent());
}
}
@bitwiseman Hi Bitwiseman! May I request the access to hub4j-test-org as I managed to have a fix for this issue and want to submit my PR? I found this issue is caused by the file content field is not returned by the API and we need to do a lazy download from the raw_url field in case the file content is needed but has a null value.
Once I authenticate to GitHub with a valid access token, but then attempt to pull the Map of Gists using this method:
gitHub.getMyself().listGists();
It will give me a map of GHGist objects and their gistId's, but when I then use the GHGist object to pull the files out of Gist, the file data comes back null.
Edit:
Here is some test code with the output if it helps:
Output:
You can see that the File objects contain the name of the file, but not the content of the file.
Thank you,
Mike
The text was updated successfully, but these errors were encountered: