Class PullRef.Smart

java.lang.Object
com.jcabi.github.PullRef.Smart
All Implemented Interfaces:
JsonReadable, PullRef
Enclosing interface:
PullRef

@Immutable @Loggable(1) public static final class PullRef.Smart extends Object implements PullRef
Smart pull request ref with extra features.
Since:
0.24
  • Constructor Details

    • Smart

      public Smart(PullRef pref)
      Public ctor.
      Parameters:
      pref - Pull request ref
  • Method Details

    • repo

      public Repo repo()
      Description copied from interface: PullRef
      Get the repository which its commit is in.
      Specified by:
      repo in interface PullRef
      Returns:
      Repo
    • ref

      public String ref() throws IOException
      Description copied from interface: PullRef
      Get its ref.
      Specified by:
      ref in interface PullRef
      Returns:
      Ref
      Throws:
      IOException - If there is any I/O problem
    • sha

      public String sha() throws IOException
      Description copied from interface: PullRef
      Get its commit SHA.
      Specified by:
      sha in interface PullRef
      Returns:
      Commit SHA
      Throws:
      IOException - If there is any I/O problem
    • user

      public User user() throws IOException
      Gets the user who owns the repository which its commit is in.
      Returns:
      User
      Throws:
      IOException - If there is any I/O problem
    • label

      public String label() throws IOException
      Get its label. Normally of the form "user:branch".
      Returns:
      Label string
      Throws:
      IOException - If there is any I/O problem
    • commit

      public Commit commit() throws IOException
      Get its commit.
      Returns:
      Commit
      Throws:
      IOException - If there is any I/O problem
    • json

      public jakarta.json.JsonObject json() throws IOException
      Description copied from interface: JsonReadable
      Describe it in a JSON object.
      Specified by:
      json in interface JsonReadable
      Returns:
      JSON object
      Throws:
      IOException - If there is any I/O problem