Class GHCommitPointer

java.lang.Object
org.kohsuke.github.GHCommitPointer

public class GHCommitPointer extends Object
Identifies a commit in GHPullRequest.
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • GHCommitPointer

      public GHCommitPointer()
      Create default GHCommitPointer instance
  • Method Details

    • getUser

      public GHUser getUser() throws IOException
      This points to the user who owns the getRepository().
      Returns:
      the user
      Throws:
      IOException - the io exception
    • getRepository

      public GHRepository getRepository()
      The repository that contains the commit.
      Returns:
      the repository
    • getRef

      public String getRef()
      Named ref to the commit. This appears to be a "short ref" that doesn't include "refs/heads/" portion.
      Returns:
      the ref
    • getSha

      public String getSha()
      SHA1 of the commit.
      Returns:
      the sha
    • getLabel

      public String getLabel()
      String that looks like "USERNAME:REF".
      Returns:
      the label
    • getCommit

      public GHCommit getCommit() throws IOException
      Obtains the commit that this pointer is referring to.
      Returns:
      the commit
      Throws:
      IOException - the io exception