diff --git a/src/main/java/org/gitlab4j/api/RepositoryApi.java b/src/main/java/org/gitlab4j/api/RepositoryApi.java index c42c0670..7863dacb 100644 --- a/src/main/java/org/gitlab4j/api/RepositoryApi.java +++ b/src/main/java/org/gitlab4j/api/RepositoryApi.java @@ -237,7 +237,7 @@ public Branch protectBranch(Object projectIdOrPath, String branchName) throws Gi * Unprotects a single project repository branch. This is an idempotent function, unprotecting an * already unprotected repository branch will not produce an error. * - *
GitLab Endpoint: PUT /projects/:id/repository/branches/:branch/unprotect
+ *
GitLab Endpoint: DELETE /projects/:id/repository/branches/:branch/unprotect
* * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance * @param branchName the name of the branch to un-protect @@ -245,7 +245,7 @@ public Branch protectBranch(Object projectIdOrPath, String branchName) throws Gi * @throws GitLabApiException if any exception occurs */ public Branch unprotectBranch(Object projectIdOrPath, String branchName) throws GitLabApiException { - Response response = put(Response.Status.OK, null, "projects", + Response response = delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "branches", urlEncode(branchName), "unprotect"); return (response.readEntity(Branch.class)); }