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
9378b786
Unverified
Commit
9378b786
authored
Aug 06, 2024
by
titilami
Committed by
GitHub
Aug 06, 2024
Browse files
add description to ProjectHook (#1132)
--------- Co-authored-by:
oubingpeng
<
oubingpeng@cecdt.com.cn
>
parent
e8a261a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/ProjectApi.java
View file @
9378b786
...
...
@@ -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
());
...
...
src/main/java/org/gitlab4j/api/models/ProjectHook.java
View file @
9378b786
...
...
@@ -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
;
}
...
...
src/test/resources/org/gitlab4j/api/hook.json
View file @
9378b786
...
...
@@ -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"
}
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