src/main/java/org/gitlab4j/api/MergeRequestApi.java
public MergeRequest acceptMergeRequest(Integer projectId, Integer mergeRequestIid,
            String mergeCommitMessage, Boolean shouldRemoveSourceBranch, Boolean mergeWhenPipelineSucceeds)
            throws GitLabApiException {
        return (acceptMergeRequest(projectId, mergeRequestIid, mergeCommitMessage,
                shouldRemoveSourceBranch, mergeWhenPipelineSucceeds, null));
    }
/**
     * Merge changes to the merge request. If the MR has any conflicts and can not be merged,
     * you'll get a 405 and the error message 'Branch cannot be merged'. If merge request is
     * already merged or closed, you'll get a 406 and the error message 'Method Not Allowed'.
     * If the sha parameter is passed and does not match the HEAD of the source, you'll get
     * a 409 and the error message 'SHA does not match HEAD of source branch'.  If you don't
     * have permissions to accept this merge request, you'll get a 401.
     *
     * <p>NOTE: GitLab API V4 uses IID (internal ID), V3 uses ID to identify the merge request.  Additionally,
     * mergeWhenPipelineSucceeds sets the merge_when_build_succeeds flag for GitLab API V3.</p>
     *
     * PUT /projects/:id/merge_requests/:merge_request_iid/merge
     *
     * @param projectId the ID of a project
     * @param mergeRequestIid the internal ID of the merge request
     * @param mergeCommitMessage, custom merge commit message, optional
     * @param shouldRemoveSourceBranch, if true removes the source branch, optional
     * @param mergeWhenPipelineSucceeds, if true the MR is merged when the pipeline, optional
     * @return the merged merge request
     * @throws GitLabApiException if any exception occurs
     */
Merge changes to the merge request. If the MR has any conflicts and can not be merged,
you'll get a 405 and the error message 'Branch cannot be merged'. If merge request is
already merged or closed, you'll get a 406 and the error message 'Method Not Allowed'.
If the sha parameter is passed and does not match the HEAD of the source, you'll get
a 409 and the error message 'SHA does not match HEAD of source branch'.  If you don't
have permissions to accept this merge request, you'll get a 401.






Merge changes to the merge request . If the MR has any conflicts and can not be merged you ' ll get a 405 and the error message ' Branch cannot be merged ' . If merge request is already merged or closed you ' ll get a 406 and the error message ' Method Not Allowed ' . If the sha parameter is passed and does not match the HEAD of the source you ' ll get a 409 and the error message ' SHA does not match HEAD of source branch ' . If you don ' t have permissions to accept this merge request you ' ll get a 401 .
public MergeRequest acceptMergeRequest(Integer projectId, Integer mergeRequestIid,
            String mergeCommitMessage, Boolean shouldRemoveSourceBranch, Boolean mergeWhenPipelineSucceeds)
            throws GitLabApiException {
        return (acceptMergeRequest(projectId, mergeRequestIid, mergeCommitMessage,
                shouldRemoveSourceBranch, mergeWhenPipelineSucceeds, null));
    }
public MergeRequest acceptMergeRequest ( Integer projectId , Integer mergeRequestIid , String mergeCommitMessage , Boolean shouldRemoveSourceBranch , Boolean mergeWhenPipelineSucceeds ) throws GitLabApiException { return ( acceptMergeRequest ( projectId , mergeRequestIid , mergeCommitMessage , shouldRemoveSourceBranch , mergeWhenPipelineSucceeds , null ) ) ; }
Merge changes to the merge request.
Merge changes to the merge request .