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 Commit
commit()
Get its commit.javax.json.JsonObject
json()
Describe it in a JSON object.String
label()
Get its label.String
ref()
Get its ref.Repo
repo()
Get the repository which its commit is in.String
sha()
Get its commit SHA.User
user()
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:PullRef
Get the repository which its commit is in.
-
ref
public String ref() throws IOException
Description copied from interface:PullRef
Get its ref.- Specified by:
ref
in interfacePullRef
- 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 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 IOException
Description copied from interface:JsonReadable
Describe it in a JSON object.- Specified by:
json
in interfaceJsonReadable
- Returns:
- JSON object
- Throws:
IOException
- If there is any I/O problem
-
-