Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/org/gitlab4j/api/RepositoryApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,15 @@ 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.
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/repository/branches/:branch/unprotect</code></pre>
* <pre><code>GitLab Endpoint: DELETE /projects/:id/repository/branches/:branch/unprotect</code></pre>
*
* @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
* @return the branch info for the unprotected branch
* @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));
}
Expand Down