Package com.jcabi.github
Interface PullComments
-
@Immutable public interface PullComments
Github pull comments.- Since:
- 0.8
- Version:
- $Id: 76fa84af0e7ef72c64cb180439861326e763ad6b $
- Author:
- Andres Candal (andres.candal@rollasolution.com)
- See Also:
- Review Comments API
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PullCommentget(int number)Get specific pull comment by number.Iterable<PullComment>iterate(int number, Map<String,String> params)Iterate all pull comments for a pull request.Iterable<PullComment>iterate(Map<String,String> params)Iterate all pull comments for this repo.PullCommentpost(String body, String commit, String path, int position)Post a new pull comment.Pullpull()Pull we're in.voidremove(int number)Removes a pull comment by ID.PullCommentreply(String body, int comment)Create a new comment as a reply to an existing pull comment.
-
-
-
Method Detail
-
pull
Pull pull()
Pull we're in.- Returns:
- Pull
-
get
PullComment get(int number)
Get specific pull comment by number.- Parameters:
number- Pull comment number- Returns:
- Pull comment
- See Also:
- Get a single comment
-
iterate
Iterable<PullComment> iterate(Map<String,String> params)
Iterate all pull comments for this repo.- Parameters:
params- Iterating parameters, as specified by API- Returns:
- Iterable of pull comments
- See Also:
- List comments in a repository
-
iterate
Iterable<PullComment> iterate(int number, Map<String,String> params)
Iterate all pull comments for a pull request.- Parameters:
number- Pull comment numberparams- Iterating parameters, as specified by API- Returns:
- Iterable of pull comments
- See Also:
- List comments on a pull request
-
post
PullComment post(String body, String commit, String path, int position) throws IOException
Post a new pull comment.- Parameters:
body- Body of itcommit- Commit ID (SHA) of itpath- Path of the file to comment onposition- Line index in the diff to comment on- Returns:
- PullComment just created
- Throws:
IOException- If there is any I/O problem- See Also:
- Create a comment
- Suppressed Checkstyle violations:
- ParameterNumberCheck (7 lines)
-
reply
PullComment reply(String body, int comment) throws IOException
Create a new comment as a reply to an existing pull comment.- Parameters:
body- Body of itcomment- Commit ID (SHA) of it- Returns:
- PullComment just created
- Throws:
IOException- If there is any I/O problem- See Also:
- Create a comment
-
remove
void remove(int number) throws IOExceptionRemoves a pull comment by ID.- Parameters:
number- The ID of the pull comment to delete.- Throws:
IOException- If there is any I/O problem.
-
-