Skip to content

Add missing properties to GHAsset and GHRelease #2108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/main/java/org/kohsuke/github/GHAsset.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ public static GHAsset[] wrap(GHAsset[] assets, GHRelease release) {

private String browserDownloadUrl;
private String contentType;
private String digest;
private long downloadCount;
private String label;
private String name;
private long size;
private String state;
private GHUser uploader;
/** The owner. */
GHRepository owner;

Expand Down Expand Up @@ -72,6 +74,15 @@ public String getContentType() {
return contentType;
}

/**
* Gets the digest.
*
* @return the digest
*/
public String getDigest() {
return digest;
}

/**
* Gets download count.
*
Expand Down Expand Up @@ -127,6 +138,15 @@ public String getState() {
return state;
}

/**
* Gets uploader.
*
* @return the uploader
*/
public GHPerson getUploader() {
return uploader;
}

/**
* Sets content type.
*
Expand Down
35 changes: 35 additions & 0 deletions src/main/java/org/kohsuke/github/GHRelease.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ static GHRelease[] wrap(GHRelease[] releases, GHRepository owner) {
private List<GHAsset> assets;

private String assetsUrl;
private GHUser author;
private String body;
private String bodyHtml;
private String bodyText;
private String discussionUrl;
private boolean draft;
private String htmlUrl;
private int mentionsCount;
private String name;
private boolean prerelease;
private String publishedAt;
Expand Down Expand Up @@ -92,6 +96,15 @@ public String getAssetsUrl() {
return assetsUrl;
}

/**
* Gets the author.
*
* @return the author
*/
public GHUser getAuthor() {
return author;
}

/**
* Gets body.
*
Expand All @@ -101,6 +114,24 @@ public String getBody() {
return body;
}

/**
* Gets body html.
*
* @return the body html
*/
public String getBodyHtml() {
return bodyHtml;
}

/**
* Gets body text.
*
* @return the body text
*/
public String getBodyText() {
return bodyText;
}

/**
* Gets discussion url. Only present if a discussion relating to the release exists
*
Expand All @@ -119,6 +150,10 @@ public URL getHtmlUrl() {
return GitHubClient.parseURL(htmlUrl);
}

public int getMentionsCount() {
return this.mentionsCount;
}

/**
* Gets name.
*
Expand Down
Loading