Skip to content

Commit 2d576fb

Browse files
authored
Add support for comment_on_event_enabled property in JiraService (#1296)
1 parent 7783c72 commit 2d576fb

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

gitlab4j-models/src/main/java/org/gitlab4j/api/services/JiraService.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public class JiraService extends NotificationService {
1414
public static final String PROJECT_KEY_PROP = "project_key";
1515
public static final String JIRA_ISSUE_TRANSITION_ID_PROP = "jira_issue_transition_id";
1616
public static final String COMMIT_EVENTS_PROP = "commit_events";
17+
public static final String COMMENT_ON_EVENT_ENABLED = "comment_on_event_enabled";
1718

1819
private CharSequence password;
1920

@@ -32,7 +33,8 @@ public GitLabForm servicePropertiesForm() {
3233
.withParam(PROJECT_KEY_PROP, getProjectKey())
3334
.withParam(USERNAME_PROP, getUsername(), true)
3435
.withParam("password", getPassword(), true)
35-
.withParam(JIRA_ISSUE_TRANSITION_ID_PROP, getJiraIssueTransitionId());
36+
.withParam(JIRA_ISSUE_TRANSITION_ID_PROP, getJiraIssueTransitionId())
37+
.withParam(COMMENT_ON_EVENT_ENABLED, getCommentOnEventEnabled());
3638
return formData;
3739
}
3840

@@ -138,6 +140,20 @@ public JiraService withJiraIssueTransitionId(Integer jiraIssueTransitionId) {
138140
return (this);
139141
}
140142

143+
@JsonIgnore
144+
public Boolean getCommentOnEventEnabled() {
145+
return (getProperty(COMMENT_ON_EVENT_ENABLED, (Boolean) null));
146+
}
147+
148+
public void setCommentOnEventEnabled(Boolean commentOnEventEnabled) {
149+
setProperty(COMMENT_ON_EVENT_ENABLED, commentOnEventEnabled);
150+
}
151+
152+
public JiraService withCommentOnEventEnabled(Boolean commentOnEventEnabled) {
153+
setCommentOnEventEnabled(commentOnEventEnabled);
154+
return (this);
155+
}
156+
141157
@Override
142158
public void setProperties(Map<String, Object> properties) {
143159
fixJiraIssueTransitionId(properties);

0 commit comments

Comments
 (0)