Skip to content

Commit f479805

Browse files
committed
Update ProjectApi.java
Add the possibility of adding noteEvents via the addHook().
1 parent fcecb0b commit f479805

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ public Project createProject(Project project, String importUrl) throws GitLabApi
10741074
* Only working with GitLab 16.9 and above.
10751075
*
10761076
* <pre><code>GitLab Endpoint: GET /projects/:id/avatar</code></pre>
1077-
*
1077+
*
10781078
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
10791079
* @return an InputStream to read the raw file from
10801080
* @throws GitLabApiException if any exception occurs
@@ -2250,13 +2250,14 @@ public ProjectHook addHook(Object projectIdOrPath, String url, ProjectHook enabl
22502250
* @throws GitLabApiException if any exception occurs
22512251
*/
22522252
public ProjectHook addHook(Object projectIdOrPath, String url, boolean doPushEvents,
2253-
boolean doIssuesEvents, boolean doMergeRequestsEvents) throws GitLabApiException {
2253+
boolean doIssuesEvents, boolean doMergeRequestsEvents, boolean doNoteEvents) throws GitLabApiException {
22542254

22552255
GitLabApiForm formData = new GitLabApiForm()
22562256
.withParam("url", url)
22572257
.withParam("push_events", doPushEvents)
22582258
.withParam("issues_events", doIssuesEvents)
2259-
.withParam("merge_requests_events", doMergeRequestsEvents);
2259+
.withParam("merge_requests_events", doMergeRequestsEvents)
2260+
.withParam("note_events", doNoteEvents);
22602261

22612262
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "hooks");
22622263
return (response.readEntity(ProjectHook.class));

0 commit comments

Comments
 (0)