src/main/java/org/gitlab4j/api/CommitsApi.java
public Comment addComment(int projectId, String sha, String note, String path, Integer line, LineType lineType) throws GitLabApiException {
        GitLabApiForm formData = new GitLabApiForm()
                .withParam("note", note, true)
                .withParam("path", path)
                .withParam("line", line)
                .withParam("line_type", lineType);
        Response response = post(Response.Status.CREATED, formData, "projects", projectId, "repository", "commits", sha, "comments");
        return (response.readEntity(Comment.class));
    }
/**
     * Add a comment to a commit.  In order to post a comment in a particular line of a particular file,
     * you must specify the full commit SHA, the path, the line and lineType should be NEW.
     *
     * POST /projects/:id/repository/commits/:sha/comments
     *
     * @param projectId the project ID that the commit belongs to
     * @param sha a commit hash or name of a branch or tag
     * @param note the text of the comment, required
     * @param path the file path relative to the repository, optional
     * @param line the line number where the comment should be placed, optional
     * @param lineType the line type, optional
     * @return a Comment instance for the posted comment
     * @throws GitLabApiException GitLabApiException if any exception occurs during execution
     */
Add a comment to a commit.  In order to post a comment in a particular line of a particular file,
you must specify the full commit SHA, the path, the line and lineType should be NEW.




Add a comment to a commit . In order to post a comment in a particular line of a particular file you must specify the full commit SHA the path the line and lineType should be NEW .
public Comment addComment(int projectId, String sha, String note, String path, Integer line, LineType lineType) throws GitLabApiException {
        GitLabApiForm formData = new GitLabApiForm()
                .withParam("note", note, true)
                .withParam("path", path)
                .withParam("line", line)
                .withParam("line_type", lineType);
        Response response = post(Response.Status.CREATED, formData, "projects", projectId, "repository", "commits", sha, "comments");
        return (response.readEntity(Comment.class));
    }
public Comment addComment ( int projectId , String sha , String note , String path , Integer line , LineType lineType ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "note" , note , true ) . withParam ( "path" , path ) . withParam ( "line" , line ) . withParam ( "line_type" , lineType ) ; Response response = post ( Response . Status . CREATED , formData , "projects" , projectId , "repository" , "commits" , sha , "comments" ) ; return ( response . readEntity ( Comment . class ) ) ; }
Add a comment to a commit.
Add a comment to a commit .