Class GHWorkflowRun
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.entities.GHWorkflowRun
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
This class represents a GitHub Workflow Run.
It provides methods for fetching data about the workflow run such as its id, repository id, head repository id, head branch, and head SHA.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
ConstructorsConstructorDescriptionGHWorkflowRun
(org.json.JSONObject jsonObject) Constructs a new GHWorkflowRun instance with the provided JSON object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the head branch of the workflow run.int
Returns the id of the head repository of the workflow run.Returns the SHA of the head commit of the workflow run.int
getId()
Returns the id of the workflow run.int
Returns the id of the repository of the workflow run.Methods inherited from class io.github.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrl, toJSONObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.coho04.githubapi.interfaces.HttpRequestInterface
extractNextPageUrl, sendDeleteRequest, sendDeleteRequestWithResponseCode, sendGetRequest, sendGetRequestWithLinkHeader, sendGetRequestWithResponseCode, sendPatchRequest, sendPostRequest, sendPutRequest
Methods inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
getArrayOrNull, getBooleanOrNull, getIntOrNull, getJSONArrayToStringList, getJSONObjectOrNull, getLocalDateOrNull, getLongOrNull, getStringOrNull
-
Constructor Details
-
GHWorkflowRun
public GHWorkflowRun(org.json.JSONObject jsonObject) Constructs a new GHWorkflowRun instance with the provided JSON object.- Parameters:
jsonObject
- the JSON object containing the workflow run data
-
-
Method Details
-
getId
public int getId()Returns the id of the workflow run.- Returns:
- the id of the workflow run
-
getHeadRepositoryId
public int getHeadRepositoryId()Returns the id of the head repository of the workflow run.- Returns:
- the id of the head repository
-
getRepositoryId
public int getRepositoryId()Returns the id of the repository of the workflow run.- Returns:
- the id of the repository
-
getHeadBranch
Returns the name of the head branch of the workflow run.- Returns:
- the name of the head branch
-
getHeadSha
Returns the SHA of the head commit of the workflow run.- Returns:
- the SHA of the head commit
-