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
c7e65c3e
Commit
c7e65c3e
authored
Jul 10, 2019
by
Greg Messner
Browse files
Moved commit_events property to JiraService (#405).
parent
e2713f33
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/services/JiraService.java
View file @
c7e65c3e
...
...
@@ -13,6 +13,7 @@ public class JiraService extends NotificationService {
public
static
final
String
PROJECT_KEY_PROP
=
"project_key"
;
public
static
final
String
USERNAME_PROP
=
"username"
;
public
static
final
String
JIRA_ISSUE_TRANSITION_ID_PROP
=
"jira_issue_transition_id"
;
public
static
final
String
COMMIT_EVENTS_PROP
=
"commit_events"
;
private
CharSequence
password
;
...
...
@@ -25,18 +26,28 @@ public class JiraService extends NotificationService {
public
GitLabApiForm
servicePropertiesForm
()
{
GitLabApiForm
formData
=
new
GitLabApiForm
()
.
withParam
(
"merge_requests_events"
,
getMergeRequestsEvents
())
.
withParam
(
"commit_events"
,
getCommitEvents
())
.
withParam
(
"url"
,
getUrl
(),
true
)
.
withParam
(
"api_url"
,
getApiUrl
())
.
withParam
(
"project_key"
,
getProjectKey
())
.
withParam
(
"username"
,
getUsername
(),
true
)
.
withParam
(
COMMIT_EVENTS_PROP
,
getCommitEvents
())
.
withParam
(
URL_PROP
,
getUrl
(),
true
)
.
withParam
(
API_URL_PROP
,
getApiUrl
())
.
withParam
(
PROJECT_KEY_PROP
,
getProjectKey
())
.
withParam
(
USERNAME_PROP
,
getUsername
(),
true
)
.
withParam
(
"password"
,
getPassword
(),
true
)
.
withParam
(
"jira_issue_transition_id"
,
getJiraIssueTransitionId
());
.
withParam
(
JIRA_ISSUE_TRANSITION_ID_PROP
,
getJiraIssueTransitionId
());
return
formData
;
}
@JsonIgnore
public
Boolean
getCommitEvents
()
{
return
(
getProperty
(
COMMIT_EVENTS_PROP
,
(
Boolean
)
null
));
}
public
void
setCommitEvents
(
Boolean
commitEvents
)
{
setProperty
(
COMMIT_EVENTS_PROP
,
commitEvents
);
}
public
JiraService
withCommitEvents
(
Boolean
commitEvents
)
{
return
withCommitEvents
(
commitEvents
,
this
);
setCommitEvents
(
commitEvents
);
return
(
this
);
}
public
JiraService
withMergeRequestsEvents
(
Boolean
mergeRequestsEvents
)
{
...
...
src/main/java/org/gitlab4j/api/services/NotificationService.java
View file @
c7e65c3e
...
...
@@ -41,7 +41,6 @@ public abstract class NotificationService {
private
Boolean
pushEvents
;
private
Boolean
issuesEvents
;
private
Boolean
confidentialIssuesEvents
;
private
Boolean
commitEvents
;
private
Boolean
mergeRequestsEvents
;
private
Boolean
tagPushEvents
;
private
Boolean
noteEvents
;
...
...
@@ -137,20 +136,6 @@ public abstract class NotificationService {
return
(
derivedInstance
);
}
@JsonIgnore
public
Boolean
getCommitEvents
()
{
return
commitEvents
;
}
public
void
setCommitEvents
(
Boolean
commitEvents
)
{
this
.
commitEvents
=
commitEvents
;
}
protected
<
T
>
T
withCommitEvents
(
Boolean
commitEvents
,
T
derivedInstance
)
{
setCommitEvents
(
commitEvents
);
return
(
derivedInstance
);
}
public
Boolean
getMergeRequestsEvents
()
{
return
mergeRequestsEvents
;
}
...
...
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