diff --git a/src/main/java/org/gitlab4j/api/RepositoryApi.java b/src/main/java/org/gitlab4j/api/RepositoryApi.java index 1fd6087f00eaaa1eadde01fa460b50792d723635..a8346e93a163171e8b90fb5d14af4934f5173569 100644 --- a/src/main/java/org/gitlab4j/api/RepositoryApi.java +++ b/src/main/java/org/gitlab4j/api/RepositoryApi.java @@ -779,4 +779,18 @@ public class RepositoryApi extends AbstractApi { return (GitLabApi.createOptionalFromException(glae)); } } + + /** + *
Delete all branches that are merged into the project’s default branch.
GitLab Endpoint: /projects/:id/repository/merged_branches
+ *
+ * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
+ * @throws GitLabApiException if any exception occurs
+ */
+ public void deleteMergedBranches(Object projectIdOrPath) throws GitLabApiException {
+ delete(Response.Status.NO_CONTENT, null, "projects",
+ getProjectIdOrPath(projectIdOrPath), "repository", "merged_branches");
+ }
}