Package com.jcabi.github
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.github.PullRef
PullRef.Smart
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Commitcommit()Get its commit.javax.json.JsonObjectjson()Describe it in a JSON object.Stringlabel()Get its label.Stringref()Get its ref.Reporepo()Get the repository which its commit is in.Stringsha()Get its commit SHA.Useruser()Gets the user who owns the repository which its commit is in.
-
-
-
Constructor Detail
-
Smart
public Smart(PullRef pref)
Public ctor.- Parameters:
pref- Pull request ref
-
-
Method Detail
-
repo
public Repo repo()
Description copied from interface:PullRefGet the repository which its commit is in.
-
ref
public String ref() throws IOException
Description copied from interface:PullRefGet its ref.- Specified by:
refin interfacePullRef- Returns:
- Ref
- Throws:
IOException- If there is any I/O problem
-
sha
public String sha() throws IOException
Description copied from interface:PullRefGet its commit SHA.- Specified by:
shain interfacePullRef- 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 javax.json.JsonObject json() throws IOExceptionDescription copied from interface:JsonReadableDescribe it in a JSON object.- Specified by:
jsonin interfaceJsonReadable- Returns:
- JSON object
- Throws:
IOException- If there is any I/O problem
-
-