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 PullComment
get(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.PullComment
post(String body, String commit, String path, int position)
Post a new pull comment.Pull
pull()
Pull we're in.void
remove(int number)
Removes a pull comment by ID.PullComment
reply(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 IOException
Removes a pull comment by ID.- Parameters:
number
- The ID of the pull comment to delete.- Throws:
IOException
- If there is any I/O problem.
-
-