java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHWorkflow
A workflow.
- Author:
- Guillaume Smet
- See Also:
-
Field Summary
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
disable()
Disable the workflow.void
Create a workflow dispatch event which triggers a manual workflow run.void
Create a workflow dispatch event which triggers a manual workflow run.void
enable()
Enable the workflow.The badge URL, like https://github.com/octo-org/octo-repo/workflows/CI/badge.svgGets the html url.getName()
The name of the workflow.getPath()
The path of the workflow e.g. .github/workflows/blank.yamlRepository to which the workflow belongs.getState()
The state of the workflow.listRuns()
Lists the workflow runs belong to this workflow.Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
Constructor Details
-
GHWorkflow
public GHWorkflow()Create default GHWorkflow instance
-
-
Method Details
-
getName
The name of the workflow.- Returns:
- the name
-
getPath
The path of the workflow e.g. .github/workflows/blank.yaml- Returns:
- the path
-
getState
The state of the workflow.- Returns:
- the state
-
getHtmlUrl
Gets the html url.- Returns:
- the html url
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getRepository
Repository to which the workflow belongs.- Returns:
- the repository
-
getBadgeUrl
The badge URL, like https://github.com/octo-org/octo-repo/workflows/CI/badge.svg- Returns:
- the badge url
-
disable
Disable the workflow.- Throws:
IOException
- the io exception
-
enable
Enable the workflow.- Throws:
IOException
- the io exception
-
dispatch
Create a workflow dispatch event which triggers a manual workflow run.- Parameters:
ref
- the git reference for the workflow. The reference can be a branch or tag name.- Throws:
IOException
- the io exception
-
dispatch
Create a workflow dispatch event which triggers a manual workflow run.- Parameters:
ref
- the git reference for the workflow. The reference can be a branch or tag name.inputs
- input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when inputs are omitted.- Throws:
IOException
- the io exception
-
listRuns
Lists the workflow runs belong to this workflow.- Returns:
- the paged iterable
-