Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
d1af4613
Commit
d1af4613
authored
Sep 19, 2019
by
Schoaf
Committed by
Greg Messner
Sep 18, 2019
Browse files
Add method to trigger housekeeping via the API. (#434)
parent
a3ccdff0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/ProjectApi.java
View file @
d1af4613
...
...
@@ -2931,4 +2931,19 @@ public class ProjectApi extends AbstractApi implements Constants {
delete
(
Response
.
Status
.
NO_CONTENT
,
null
,
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"access_requests"
,
userId
);
}
/**
* Start the Housekeeping task for a project.
*
* <pre>
* <code>GitLab Endpoint: POST /projects/:id/housekeeping</code>
* </pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @throws GitLabApiException if any exception occurs
*/
public
void
triggerHousekeeping
(
Object
projectIdOrPath
)
throws
GitLabApiException
{
Form
formData
=
null
;
post
(
Response
.
Status
.
OK
,
formData
,
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"housekeeping"
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment