java.lang.Object
de.coho04.githubapi.bases.GHBase
de.coho04.githubapi.entities.repositories.GHBranch
Alle implementierten Schnittstellen:
HttpRequestInterface, JSONHelper

public class GHBranch extends GHBase
This class represents a GitHub branch. It provides methods for fetching data about the branch such as its name, commit SHA, commit URL, and protection status.
  • Konstruktordetails

    • GHBranch

      public GHBranch(org.json.JSONObject jsonObject)
      Constructs a new GHBranch instance with the provided JSON object.
      Parameter:
      jsonObject - the JSON object containing the branch data
  • Methodendetails

    • toJSONObject

      public org.json.JSONObject toJSONObject()
      Converts this GHBranch instance to a JSONObject.
      Setzt außer Kraft:
      toJSONObject in Klasse GHBase
      Gibt zurück:
      the JSONObject representation of this GHBranch instance
    • getName

      public String getName()
      Returns the branch name.
      Gibt zurück:
      the branch name
    • getCommitSha

      public String getCommitSha()
      Returns the commit SHA.
      Gibt zurück:
      the commit SHA
    • getCommitUrl

      public String getCommitUrl()
      Returns the commit URL.
      Gibt zurück:
      the commit URL
    • isProtected

      public boolean isProtected()
      Returns the branch protection status.
      Gibt zurück:
      true if the branch is protected, false otherwise