Package org.kohsuke.github
Class GHWorkflowJob
- java.lang.Object
-
- org.kohsuke.github.GHObject
-
- org.kohsuke.github.GHWorkflowJob
-
public class GHWorkflowJob extends GHObject
A workflow run job.- Author:
- Guillaume Smet
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGHWorkflowJob.Step
-
Field Summary
-
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
-
Constructor Summary
Constructors Constructor Description GHWorkflowJob()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TdownloadLogs(InputStreamFunction<T> streamFunction)Downloads the logs.URLgetCheckRunUrl()The check run URL.DategetCompletedAt()When was this job completed?GHWorkflowRun.ConclusiongetConclusion()Gets the conclusion of the job.StringgetHeadSha()Gets the HEAD SHA.URLgetHtmlUrl()Gets html url.StringgetName()The name of the job.GHRepositorygetRepository()Repository to which the job belongs.longgetRunId()The run id.DategetStartedAt()When was this job started?GHWorkflowRun.StatusgetStatus()Gets status of the job.List<GHWorkflowJob.Step>getSteps()Gets the execution steps of this job.-
Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
-
-
-
Method Detail
-
getName
public String getName()
The name of the job.- Returns:
- the name
-
getHeadSha
public String getHeadSha()
Gets the HEAD SHA.- Returns:
- sha for the HEAD commit
-
getStartedAt
public Date getStartedAt()
When was this job started?- Returns:
- start date
-
getCompletedAt
public Date getCompletedAt()
When was this job completed?- Returns:
- completion date
-
getStatus
public GHWorkflowRun.Status getStatus()
Gets status of the job.Can be
UNKNOWNif the value returned by GitHub is unknown from the API.- Returns:
- status of the job
-
getConclusion
public GHWorkflowRun.Conclusion getConclusion()
Gets the conclusion of the job.Can be
UNKNOWNif the value returned by GitHub is unknown from the API.- Returns:
- conclusion of the job
-
getRunId
public long getRunId()
The run id.- Returns:
- the run id
-
getHtmlUrl
public URL getHtmlUrl()
Description copied from class:GHObjectGets html url.- Specified by:
getHtmlUrlin classGHObject- Returns:
- URL of this object for humans, which renders some HTML.
-
getCheckRunUrl
public URL getCheckRunUrl()
The check run URL.- Returns:
- the check run url
-
getSteps
public List<GHWorkflowJob.Step> getSteps()
Gets the execution steps of this job.- Returns:
- the execution steps
-
getRepository
public GHRepository getRepository()
Repository to which the job belongs.- Returns:
- the repository
-
downloadLogs
public <T> T downloadLogs(InputStreamFunction<T> streamFunction) throws IOException
Downloads the logs.The logs are returned as a text file.
- Type Parameters:
T- the type of result- Parameters:
streamFunction- TheInputStreamFunctionthat will process the stream- Returns:
- the result of reading the stream.
- Throws:
IOException- The IO exception.
-
-