Class GHAlert
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.entities.GHAlert
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
This class represents a GitHub Alert.
It provides methods for fetching data about the alert such as its number, creation date, url, html url, locations url, state, resolution, resolved at date, resolved by user, secret type, secret type display name, secret, repository, push protection bypassed by user, push protection bypassed status, push protection bypassed at date, resolution comment, and validity.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the creation date of the alert.Returns the GitHub instance associated with the alert.Returns the html url of the alert.Returns the locations url of the alert.int
Returns the number of the alert.Returns the date when the push protection was bypassed for the alert.Returns the user who bypassed the push protection of the alert.Returns the repository of the alert.Returns the resolution of the alert.Returns the resolution comment of the alert.Returns the date when the alert was resolved.Returns the user who resolved the alert.Returns the secret of the alert.Returns the secret type of the alert.Returns the display name of the secret type of the alert.getState()
Returns the state of the alert.getUrl()
Returns the url of the alert.Returns the validity of the alert.boolean
Returns the push protection bypassed status of the alert.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
-
GHAlert
Constructs a new GHAlert instance with the provided JSON object and GitHub instance.- Parameters:
jsonObject
- the JSON object containing the alert datagithub
- the GitHub instance associated with this alert
-
-
Method Details
-
getCreatedAt
Returns the creation date of the alert.- Returns:
- the creation date of the alert
-
getNumber
public int getNumber()Returns the number of the alert.- Returns:
- the number of the alert
-
getState
Returns the state of the alert.- Returns:
- the state of the alert
-
getHtmlUrl
Returns the html url of the alert.- Returns:
- the html url of the alert
-
getUrl
Returns the url of the alert.- Returns:
- the url of the alert
-
getRepository
Returns the repository of the alert.- Returns:
- the repository of the alert
-
getPushProtectionBypassedBy
Returns the user who bypassed the push protection of the alert.- Returns:
- the user who bypassed the push protection of the alert
-
getResolvedBy
Returns the user who resolved the alert.- Returns:
- the user who resolved the alert
-
getGithub
Returns the GitHub instance associated with the alert.- Returns:
- the GitHub instance associated with the alert
-
getPushProtectionBypassedAt
Returns the date when the push protection was bypassed for the alert.- Returns:
- the date when the push protection was bypassed for the alert
-
getResolvedAt
Returns the date when the alert was resolved.- Returns:
- the date when the alert was resolved
-
getLocationsUrl
Returns the locations url of the alert.- Returns:
- the locations url of the alert
-
getResolution
Returns the resolution of the alert.- Returns:
- the resolution of the alert
-
getResolutionComment
Returns the resolution comment of the alert.- Returns:
- the resolution comment of the alert
-
getSecret
Returns the secret of the alert.- Returns:
- the secret of the alert
-
getSecretType
Returns the secret type of the alert.- Returns:
- the secret type of the alert
-
getSecretTypeDisplayName
Returns the display name of the secret type of the alert.- Returns:
- the display name of the secret type of the alert
-
getValidity
Returns the validity of the alert.- Returns:
- the validity of the alert
-
isPushProtectionBypassed
public boolean isPushProtectionBypassed()Returns the push protection bypassed status of the alert.- Returns:
- the push protection bypassed status of the alert
-