src/main/java/org/gitlab4j/api/CommitsApi.java
public Commit createCommit(int projectId, String branch, String commitMessage, String startBranch,
            String authorEmail, String authorName, List<CommitAction> actions) throws GitLabApiException {

        CommitPayload payload = new CommitPayload();
        payload.setBranch(branch);
        payload.setCommitMessage(commitMessage);
        payload.setStartBranch(startBranch);
        payload.setAuthorEmail(authorEmail);
        payload.setAuthorName(authorName);
        payload.setActions(actions);

        Response response = post(Response.Status.CREATED, payload, "projects", projectId, "repository", "commits");
        return (response.readEntity(Commit.class));
    }
/**
     * Create a commit with multiple files and actions.
     *
     * POST /projects/:id/repository/commits
     *
     * @param projectId the ID of the project
     * @param branch tame of the branch to commit into. To create a new branch, also provide startBranch
     * @param commitMessage the commit message
     * @param startBranch the name of the branch to start the new commit from
     * @param authorEmail the commit author's email address
     * @param authorName the commit author's name
     * @param actions the array of CommitAction to commit as a batch
     * @return the create Commit instance
     * @throws GitLabApiException if any exception occurs during execution
     */
Create a commit with multiple files and actions.
POST /projects/:id/repository/commits

@param projectId the ID of the project
@param branch tame of the branch to commit into.
Create a commit with multiple files and actions . POST / projects / : id / repository / commits @param projectId the ID of the project @param branch tame of the branch to commit into .
public Commit createCommit(int projectId, String branch, String commitMessage, String startBranch,
            String authorEmail, String authorName, List<CommitAction> actions) throws GitLabApiException {
        CommitPayload payload = new CommitPayload();
        payload.setBranch(branch);
        payload.setCommitMessage(commitMessage);
        payload.setStartBranch(startBranch);
        payload.setAuthorEmail(authorEmail);
        payload.setAuthorName(authorName);
        payload.setActions(actions);
        Response response = post(Response.Status.CREATED, payload, "projects", projectId, "repository", "commits");
        return (response.readEntity(Commit.class));
    }
public Commit createCommit ( int projectId , String branch , String commitMessage , String startBranch , String authorEmail , String authorName , List < CommitAction > actions ) throws GitLabApiException { CommitPayload payload = new CommitPayload ( ) ; payload . setBranch ( branch ) ; payload . setCommitMessage ( commitMessage ) ; payload . setStartBranch ( startBranch ) ; payload . setAuthorEmail ( authorEmail ) ; payload . setAuthorName ( authorName ) ; payload . setActions ( actions ) ; Response response = post ( Response . Status . CREATED , payload , "projects" , projectId , "repository" , "commits" ) ; return ( response . readEntity ( Commit . class ) ) ; }
Create a commit with multiple files and actions.
Create a commit with multiple files and actions .