Package org.kohsuke.github
Class GHWorkflowRun
- java.lang.Object
-
- org.kohsuke.github.GHObject
-
- org.kohsuke.github.GHWorkflowRun
-
public class GHWorkflowRun extends GHObject
A workflow run.- Author:
- Guillaume Smet
- See Also:
GHRepository.getWorkflowRun(long)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGHWorkflowRun.Conclusionstatic classGHWorkflowRun.HeadCommitstatic classGHWorkflowRun.Status
-
Field Summary
-
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
-
Constructor Summary
Constructors Constructor Description GHWorkflowRun()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancel the workflow run.voiddelete()Delete the workflow run.URLgetArtifactsUrl()The artifacts URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifactsURLgetCancelUrl()The cancel URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancelURLgetCheckSuiteUrl()The check suite URL, like https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374GHWorkflowRun.ConclusiongetConclusion()Gets the conclusion of the workflow run.GHEventgetEvent()The type of event that triggered the build.StringgetHeadBranch()The head branch name the changes are on.GHWorkflowRun.HeadCommitgetHeadCommit()The commit of current head.GHRepositorygetHeadRepository()The repository of current head.StringgetHeadSha()Gets the HEAD SHA.URLgetHtmlUrl()Gets html url.URLgetJobsUrl()The jobs URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobsURLgetLogsUrl()The logs URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logsStringgetName()The name of the workflow run.List<GHPullRequest>getPullRequests()Gets the pull requests participated in this workflow run.URLgetRerunUrl()The rerun URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerunlonggetRunNumber()The run number.GHWorkflowRun.StatusgetStatus()Gets status of the workflow run.longgetWorkflowId()The workflow id.URLgetWorkflowUrl()The workflow URL, like https://api.github.com/repos/octo-org/octo-repo/actions/workflows/159038voidrerun()Rerun the workflow run.-
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 workflow run.- Returns:
- the name
-
getRunNumber
public long getRunNumber()
The run number.- Returns:
- the run number
-
getWorkflowId
public long getWorkflowId()
The workflow id.- Returns:
- the workflow id
-
getHtmlUrl
public URL getHtmlUrl() throws IOException
Description copied from class:GHObjectGets html url.- Specified by:
getHtmlUrlin classGHObject- Returns:
- URL of this object for humans, which renders some HTML.
- Throws:
IOException- on error
-
getJobsUrl
public URL getJobsUrl()
The jobs URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs- Returns:
- the diff url
-
getLogsUrl
public URL getLogsUrl()
The logs URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs- Returns:
- the diff url
-
getCheckSuiteUrl
public URL getCheckSuiteUrl()
The check suite URL, like https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374- Returns:
- the diff url
-
getArtifactsUrl
public URL getArtifactsUrl()
The artifacts URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifacts- Returns:
- the diff url
-
getCancelUrl
public URL getCancelUrl()
The cancel URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancel- Returns:
- the diff url
-
getRerunUrl
public URL getRerunUrl()
The rerun URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerun- Returns:
- the diff url
-
getWorkflowUrl
public URL getWorkflowUrl()
The workflow URL, like https://api.github.com/repos/octo-org/octo-repo/actions/workflows/159038- Returns:
- the diff url
-
getHeadBranch
public String getHeadBranch()
The head branch name the changes are on.- Returns:
- head branch name
-
getHeadSha
public String getHeadSha()
Gets the HEAD SHA.- Returns:
- sha for the HEAD commit
-
getHeadCommit
public GHWorkflowRun.HeadCommit getHeadCommit()
The commit of current head.- Returns:
- head commit
-
getHeadRepository
public GHRepository getHeadRepository()
The repository of current head.- Returns:
- head repository
-
getEvent
public GHEvent getEvent()
The type of event that triggered the build.- Returns:
- type of event
-
getStatus
public GHWorkflowRun.Status getStatus()
Gets status of the workflow run.Can be
UNKNOWNif the value returned by GitHub is unknown from the API.- Returns:
- status of the workflow run
-
getConclusion
public GHWorkflowRun.Conclusion getConclusion()
Gets the conclusion of the workflow run.Can be
UNKNOWNif the value returned by GitHub is unknown from the API.- Returns:
- conclusion of the workflow run
-
getPullRequests
public List<GHPullRequest> getPullRequests() throws IOException
Gets the pull requests participated in this workflow run. Note this field is only populated for events. When getting aGHWorkflowRunoutside of an event, this is always empty.- Returns:
- the list of
GHPullRequests for this workflow run. Only populated for events. - Throws:
IOException- the io exception
-
cancel
public void cancel() throws IOExceptionCancel the workflow run.- Throws:
IOException- the io exception
-
delete
public void delete() throws IOExceptionDelete the workflow run.- Throws:
IOException- the io exception
-
rerun
public void rerun() throws IOExceptionRerun the workflow run.- Throws:
IOException- the io exception
-
-