java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHWorkflowJob
A workflow run job.
- Author:
- Guillaume Smet
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
downloadLogs
(InputStreamFunction<T> streamFunction) Downloads the logs.The check run URL.When was this job completed?.Gets the conclusion of the job.Gets the HEAD SHA.Gets the html url.Gets the labels of the job.getName()
The name of the job.Repository to which the job belongs.int
Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run.long
getRunId()
The run id.int
the runner group id.the runner group name.int
the runner id.the runner name.When was this job started?.Gets status of the job.getSteps()
Gets the execution steps of this job.Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
Constructor Details
-
GHWorkflowJob
public GHWorkflowJob()Create default GHWorkflowJob instance
-
-
Method Details
-
downloadLogs
Downloads the logs.The logs are returned as a text file.
- 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.
-
getCheckRunUrl
The check run URL.- Returns:
- the check run url
-
getCompletedAt
@WithBridgeMethods(value=java.util.Date.class, adapterMethod="instantToDate") public Instant getCompletedAt()When was this job completed?.- Returns:
- completion date
-
getConclusion
Gets the conclusion of the job.Can be
UNKNOWN
if the value returned by GitHub is unknown from the API.- Returns:
- conclusion of the job
-
getHeadSha
Gets the HEAD SHA.- Returns:
- sha for the HEAD commit
-
getHtmlUrl
Gets the html url.- Returns:
- the html url
-
getLabels
Gets the labels of the job.- Returns:
- the labels
-
getName
The name of the job.- Returns:
- the name
-
getRepository
Repository to which the job belongs.- Returns:
- the repository
-
getRunAttempt
public int getRunAttempt()Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run.- Returns:
- attempt number
-
getRunId
public long getRunId()The run id.- Returns:
- the run id
-
getRunnerGroupId
public int getRunnerGroupId()the runner group id.- Returns:
- runnerGroupId
-
getRunnerGroupName
the runner group name.- Returns:
- runnerGroupName
-
getRunnerId
public int getRunnerId()the runner id.- Returns:
- runnerId
-
getRunnerName
the runner name.- Returns:
- runnerName
-
getStartedAt
@WithBridgeMethods(value=java.util.Date.class, adapterMethod="instantToDate") public Instant getStartedAt()When was this job started?.- Returns:
- start date
-
getStatus
Gets status of the job.Can be
UNKNOWN
if the value returned by GitHub is unknown from the API.- Returns:
- status of the job
-
getSteps
Gets the execution steps of this job.- Returns:
- the execution steps
-