java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHWorkflowJob
A workflow run job.
- Author:
- Guillaume Smet
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
Constructor Summary
-
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
-
getName
The name of the job.- Returns:
- the name
-
getHeadSha
Gets the HEAD SHA.- Returns:
- sha for the HEAD commit
-
getStartedAt
When was this job started?.- Returns:
- start date
-
getCompletedAt
When was this job completed?.- Returns:
- completion 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
-
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
-
getRunId
public long getRunId()The run id.- Returns:
- the run id
-
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
-
getHtmlUrl
Gets the html url.- Returns:
- the html url
-
getCheckRunUrl
The check run URL.- Returns:
- the check run url
-
getSteps
Gets the execution steps of this job.- Returns:
- the execution steps
-
getLabels
Gets the labels of the job.- Returns:
- the labels
-
getRunnerId
public int getRunnerId()the runner id.- Returns:
- runnerId
-
getRunnerName
the runner name.- Returns:
- runnerName
-
getRunnerGroupId
public int getRunnerGroupId()the runner group id.- Returns:
- runnerGroupId
-
getRunnerGroupName
the runner group name.- Returns:
- runnerGroupName
-
getRepository
Repository to which the job belongs.- Returns:
- the repository
-
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.
-