Package org.kohsuke.github
Class GHArtifact
java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHArtifact
An artifact from a workflow run.
- Author:
- Guillaume Smet
-
Field Summary
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Deletes the artifact.<T> T
download
(InputStreamFunction<T> streamFunction) Downloads the artifact.Gets the archive download URL.Gets the date at which this artifact will expire.Deprecated.This object has no HTML URL.getName()
Gets the name.Repository to which the artifact belongs.getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.long
Gets the size of the artifact in bytes.boolean
If this artifact has expired.Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
Constructor Details
-
GHArtifact
public GHArtifact()
-
-
Method Details
-
getName
Gets the name.- Returns:
- the name
-
getSizeInBytes
public long getSizeInBytes()Gets the size of the artifact in bytes.- Returns:
- the size
-
getArchiveDownloadUrl
Gets the archive download URL.- Returns:
- the archive download URL
-
isExpired
public boolean isExpired()If this artifact has expired.- Returns:
- if the artifact has expired
-
getExpiresAt
Gets the date at which this artifact will expire.- Returns:
- the date of expiration
-
getRepository
Repository to which the artifact belongs.- Returns:
- the repository
-
getHtmlUrl
Deprecated.This object has no HTML URL.Gets the html url.- Specified by:
getHtmlUrl
in classGHObject
- Returns:
- the html url
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
delete
Deletes the artifact.- Throws:
IOException
- the io exception
-
download
Downloads the artifact.- Type Parameters:
T
- the type of result- Parameters:
streamFunction
- TheInputStreamFunction
that will process the stream- Returns:
- the result of reading the stream.
- Throws:
IOException
- The IO exception.
-
getRoot
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.Get the rootGitHub
instance for this object.- Returns:
- the root
GitHub
instance
-