diff --git a/README.md b/README.md index 5272205..eeffaf0 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ - If you can't find same question and report, send it to [gitter room](https://gitter.im/gitbucket/gitbucket) before raising an issue. - The highest priority of GitBucket is the ease of installation and API compatibility with GitHub, so your feature request might be rejected if they go against those principles. -What's New in 4.32.x +What's New in 4.33.x ------------- ### 4.33.0 - 31 Dec 2019 diff --git a/src/main/scala/gitbucket/core/service/ActivityService.scala b/src/main/scala/gitbucket/core/service/ActivityService.scala index cba9007..5064630 100644 --- a/src/main/scala/gitbucket/core/service/ActivityService.scala +++ b/src/main/scala/gitbucket/core/service/ActivityService.scala @@ -131,6 +131,23 @@ currentDate ) + def recordReopenPullRequestActivity( + userName: String, + repositoryName: String, + activityUserName: String, + issueId: Int, + title: String + )(implicit s: Session): Unit = + Activities insert Activity( + userName, + repositoryName, + activityUserName, + "reopen_issue", + s"[user:${activityUserName}] reopened pull request [issue:${userName}/${repositoryName}#${issueId}]", + Some(title), + currentDate + ) + def recordCommentIssueActivity( userName: String, repositoryName: String, diff --git a/src/main/scala/gitbucket/core/service/HandleCommentService.scala b/src/main/scala/gitbucket/core/service/HandleCommentService.scala index c9da544..604ae16 100644 --- a/src/main/scala/gitbucket/core/service/HandleCommentService.scala +++ b/src/main/scala/gitbucket/core/service/HandleCommentService.scala @@ -39,7 +39,10 @@ )) case "reopen" if (issue.closed) => false -> - (Some("reopen") -> Some(recordReopenIssueActivity _)) + (Some("reopen") -> Some( + if (issue.isPullRequest) recordReopenPullRequestActivity _ + else recordReopenIssueActivity _ + )) } .map { case (closed, t) =>