Class GHAlert

java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.entities.GHAlert
All Implemented Interfaces:
HttpRequestInterface, JSONHelper

public class GHAlert extends GHBase
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.
  • Constructor Details

    • GHAlert

      public GHAlert(org.json.JSONObject jsonObject, Github github)
      Constructs a new GHAlert instance with the provided JSON object and GitHub instance.
      Parameters:
      jsonObject - the JSON object containing the alert data
      github - the GitHub instance associated with this alert
  • Method Details

    • getCreatedAt

      public OffsetDateTime 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

      public String getState()
      Returns the state of the alert.
      Returns:
      the state of the alert
    • getHtmlUrl

      public String getHtmlUrl()
      Returns the html url of the alert.
      Returns:
      the html url of the alert
    • getUrl

      public String getUrl()
      Returns the url of the alert.
      Returns:
      the url of the alert
    • getRepository

      public GHRepository getRepository()
      Returns the repository of the alert.
      Returns:
      the repository of the alert
    • getPushProtectionBypassedBy

      public GHUser getPushProtectionBypassedBy()
      Returns the user who bypassed the push protection of the alert.
      Returns:
      the user who bypassed the push protection of the alert
    • getResolvedBy

      public GHUser getResolvedBy()
      Returns the user who resolved the alert.
      Returns:
      the user who resolved the alert
    • getGithub

      public Github getGithub()
      Returns the GitHub instance associated with the alert.
      Returns:
      the GitHub instance associated with the alert
    • getPushProtectionBypassedAt

      public OffsetDateTime 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

      public OffsetDateTime getResolvedAt()
      Returns the date when the alert was resolved.
      Returns:
      the date when the alert was resolved
    • getLocationsUrl

      public String getLocationsUrl()
      Returns the locations url of the alert.
      Returns:
      the locations url of the alert
    • getResolution

      public String getResolution()
      Returns the resolution of the alert.
      Returns:
      the resolution of the alert
    • getResolutionComment

      public String getResolutionComment()
      Returns the resolution comment of the alert.
      Returns:
      the resolution comment of the alert
    • getSecret

      public String getSecret()
      Returns the secret of the alert.
      Returns:
      the secret of the alert
    • getSecretType

      public String getSecretType()
      Returns the secret type of the alert.
      Returns:
      the secret type of the alert
    • getSecretTypeDisplayName

      public String getSecretTypeDisplayName()
      Returns the display name of the secret type of the alert.
      Returns:
      the display name of the secret type of the alert
    • getValidity

      public String 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