Skip to content

Commit d1af461

Browse files
Schoafgmessner
authored andcommitted
Add method to trigger housekeeping via the API. (#434)
1 parent a3ccdff commit d1af461

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/main/java/org/gitlab4j/api/ProjectApi.java

+15
Original file line numberDiff line numberDiff line change
@@ -2931,4 +2931,19 @@ public void denyAccessRequest(Object projectIdOrPath, Integer userId) throws Git
29312931
delete(Response.Status.NO_CONTENT, null,
29322932
"projects", getProjectIdOrPath(projectIdOrPath), "access_requests", userId);
29332933
}
2934+
2935+
/**
2936+
* Start the Housekeeping task for a project.
2937+
*
2938+
* <pre>
2939+
* <code>GitLab Endpoint: POST /projects/:id/housekeeping</code>
2940+
* </pre>
2941+
*
2942+
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
2943+
* @throws GitLabApiException if any exception occurs
2944+
*/
2945+
public void triggerHousekeeping(Object projectIdOrPath) throws GitLabApiException {
2946+
Form formData = null;
2947+
post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "housekeeping");
2948+
}
29342949
}

0 commit comments

Comments
 (0)