Unverified Commit 9378b786 authored by titilami's avatar titilami Committed by GitHub
Browse files

add description to ProjectHook (#1132)



---------

Co-authored-by: default avataroubingpeng <oubingpeng@cecdt.com.cn>
parent e8a261a5
......@@ -2233,6 +2233,7 @@ public class ProjectApi extends AbstractApi implements Constants {
.withParam("deployment_events", enabledHooks.getDeploymentEvents(), false)
.withParam("releases_events", enabledHooks.getReleasesEvents(), false)
.withParam("deployment_events", enabledHooks.getDeploymentEvents(), false)
.withParam("description", enabledHooks.getDescription(), false)
.withParam("token", secretToken, false);
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "hooks");
return (response.readEntity(ProjectHook.class));
......@@ -2336,6 +2337,7 @@ public class ProjectApi extends AbstractApi implements Constants {
.withParam("repository_update_events", hook.getRepositoryUpdateEvents(), false)
.withParam("releases_events", hook.getReleasesEvents(), false)
.withParam("deployment_events", hook.getDeploymentEvents(), false)
.withParam("description", hook.getDescription(), false)
.withParam("token", hook.getToken(), false);
Response response = put(Response.Status.OK, formData.asMap(), "projects", hook.getProjectId(), "hooks", hook.getId());
......
......@@ -33,6 +33,8 @@ public class ProjectHook implements Serializable {
private Boolean deploymentEvents;
private Boolean releasesEvents;
private String description;
public Boolean getBuildEvents() {
return buildEvents;
}
......@@ -177,6 +179,14 @@ public class ProjectHook implements Serializable {
this.releasesEvents = releasesEvents;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Boolean getConfidentialIssuesEvents() {
return confidentialIssuesEvents;
}
......
......@@ -15,5 +15,6 @@
"pipeline_events": true,
"wiki_page_events": true,
"enable_ssl_verification": true,
"created_at": "2012-10-12T17:04:47Z"
"created_at": "2012-10-12T17:04:47Z",
"description": "hook description"
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment