public class GHRelease extends GHObject
created_at, id, responseHeaderFields, updated_at, url| Constructor and Description |
|---|
GHRelease() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Deletes this release.
|
List<GHAsset> |
getAssets()
Gets assets.
|
String |
getAssetsUrl()
Gets assets url.
|
String |
getBody()
Gets body.
|
URL |
getHtmlUrl()
Gets html url.
|
String |
getName()
Gets name.
|
GHRepository |
getOwner()
Gets owner.
|
Date |
getPublished_at()
Gets published at.
|
GitHub |
getRoot()
Gets root.
|
String |
getTagName()
Gets tag name.
|
String |
getTarballUrl()
Gets tarball url.
|
String |
getTargetCommitish()
Gets target commitish.
|
String |
getUploadUrl()
Gets upload url.
|
String |
getZipballUrl()
Gets zipball url.
|
boolean |
isDraft()
Is draft boolean.
|
boolean |
isPrerelease()
Is prerelease boolean.
|
GHRelease |
setDraft(boolean draft)
Deprecated.
Use
update() |
void |
setName(String name)
Sets name.
|
void |
setOwner(GHRepository owner)
Sets owner.
|
GHReleaseUpdater |
update()
Updates this release via a builder.
|
GHAsset |
uploadAsset(File file,
String contentType)
Because github relies on SNI (http://en.wikipedia.org/wiki/Server_Name_Indication) this method will only work on
Java 7 or greater.
|
GHAsset |
uploadAsset(String filename,
InputStream stream,
String contentType)
Upload asset gh asset.
|
getCreatedAt, getId, getResponseHeaderFields, getUpdatedAt, getUrl, toStringpublic String getAssetsUrl()
public String getBody()
public boolean isDraft()
public GHRelease setDraft(boolean draft) throws IOException
update()draft - the draftIOException - the io exceptionpublic URL getHtmlUrl()
GHObjectgetHtmlUrl in class GHObjectpublic String getName()
public void setName(String name)
name - the namepublic GHRepository getOwner()
public void setOwner(GHRepository owner)
owner - the ownerpublic boolean isPrerelease()
public Date getPublished_at()
public GitHub getRoot()
public String getTagName()
public String getTargetCommitish()
public String getUploadUrl()
public String getZipballUrl()
public String getTarballUrl()
public GHAsset uploadAsset(File file, String contentType) throws IOException
file - the filecontentType - the content typeIOException - the io exceptionpublic GHAsset uploadAsset(String filename, InputStream stream, String contentType) throws IOException
filename - the filenamestream - the streamcontentType - the content typeIOException - the io exceptionpublic List<GHAsset> getAssets() throws IOException
IOException - the io exceptionpublic void delete()
throws IOException
IOException - the io exceptionpublic GHReleaseUpdater update()
Copyright © 2020. All rights reserved.