Skip to content

Commit bee12b8

Browse files
committed
rename DISPATCH_EVENT
1 parent 4bb3de6 commit bee12b8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kotlin-jira-client/kotlin-jira-client-sdk/src/main/kotlin/com/linkedplanet/kotlinjiraclient/sdk/SdkJiraCommentOperator.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ object SdkJiraCommentOperator : JiraCommentOperator {
3838
private val commentService : CommentService = ComponentAccessor.getComponent(CommentService::class.java)
3939
private val jiraAuthenticationContext = ComponentAccessor.getJiraAuthenticationContext()
4040
private fun user() = jiraAuthenticationContext.loggedInUser
41-
private val dispatchEvent: Boolean = true // default dispatch behaviour for this operator
41+
private const val DISPATCH_EVENT: Boolean = true // default dispatch behaviour for this operator
4242

4343
override suspend fun getComments(issueKey: String): Either<JiraClientError, List<JiraIssueComment>> =
4444
eitherAndCatch {
@@ -52,7 +52,7 @@ object SdkJiraCommentOperator : JiraCommentOperator {
5252
val issue = issueService.getIssue(user(), issueKey).toEither().bind().issue
5353
val commentParameters = newCommentParameters(issue, content)
5454
val validateComment = commentService.validateCommentCreate(user(), commentParameters).toEither().bind()
55-
commentService.create(user(), validateComment, dispatchEvent)
55+
commentService.create(user(), validateComment, DISPATCH_EVENT)
5656
validateComment.toEither().bind()
5757
}
5858

@@ -64,7 +64,7 @@ object SdkJiraCommentOperator : JiraCommentOperator {
6464
val issue = issueService.getIssue(user(), issueKey).toEither().bind().issue
6565
val commentParameters = newCommentParameters(issue, content)
6666
val valid = commentService.validateCommentUpdate(user(), commentId.toLong(), commentParameters).toEither().bind()
67-
commentService.update(user(), valid, dispatchEvent)
67+
commentService.update(user(), valid, DISPATCH_EVENT)
6868
}
6969

7070
override suspend fun deleteComment(issueKey: String, id: String): Either<JiraClientError, Unit> =
@@ -73,7 +73,7 @@ object SdkJiraCommentOperator : JiraCommentOperator {
7373
val comment = commentService.getCommentById(user(), id.toLongOrNull()!!, simpleErrorCollection)
7474
simpleErrorCollection.toEither().bind()
7575
val jiraServiceContextImpl = JiraServiceContextImpl(user())
76-
commentService.delete(jiraServiceContextImpl, comment, dispatchEvent)
76+
commentService.delete(jiraServiceContextImpl, comment, DISPATCH_EVENT)
7777
jiraServiceContextImpl.errorCollection.toEither().bind()
7878
}
7979

0 commit comments

Comments
 (0)