Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion gitlab4j-api/src/main/java/org/gitlab4j/api/ProjectApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2497,7 +2497,7 @@ public ProjectHook addHook(
.withParam("repository_update_events", enabledHooks.getRepositoryUpdateEvents(), false)
.withParam("deployment_events", enabledHooks.getDeploymentEvents(), false)
.withParam("releases_events", enabledHooks.getReleasesEvents(), false)
.withParam("deployment_events", enabledHooks.getDeploymentEvents(), false)
.withParam("name", enabledHooks.getName(), false)
.withParam("description", enabledHooks.getDescription(), false)
.withParam("token", secretToken, false);
Response response =
Expand Down Expand Up @@ -2613,6 +2613,7 @@ public ProjectHook modifyHook(ProjectHook hook) throws GitLabApiException {
.withParam("repository_update_events", hook.getRepositoryUpdateEvents(), false)
.withParam("releases_events", hook.getReleasesEvents(), false)
.withParam("deployment_events", hook.getDeploymentEvents(), false)
.withParam("name", hook.getName(), false)
.withParam("description", hook.getDescription(), false)
.withParam("token", hook.getToken(), false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class ProjectHook implements Serializable {
private Boolean deploymentEvents;
private Boolean releasesEvents;

private String name;
private String description;

public Boolean getBuildEvents() {
Expand Down Expand Up @@ -178,6 +179,14 @@ public void setReleasesEvents(Boolean releasesEvents) {
this.releasesEvents = releasesEvents;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getDescription() {
return description;
}
Expand Down Expand Up @@ -280,6 +289,16 @@ public ProjectHook withReleasesEvents(Boolean releasesEvents) {
return (this);
}

public ProjectHook withName(String name) {
this.name = name;
return (this);
}

public ProjectHook withDescription(String description) {
this.description = description;
return (this);
}

@Override
public String toString() {
return (JacksonJson.toJsonString(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"wiki_page_events": true,
"enable_ssl_verification": true,
"created_at": "2012-10-12T17:04:47Z",
"name": "hook name",
"description": "hook description"
}
Loading