mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 21:45:50 +01:00
Migrate activity log to JSON-based file from database (#2468)
This also includes: - Record rename and transfer repository in activity log - Check existence of repsoitory when rendering activity logs - Drop Akka dependency
This commit is contained in:
@@ -14,7 +14,7 @@ import scala.util.Using
|
||||
class MergeServiceSpec extends FunSpec {
|
||||
val service = new MergeService with AccountService with ActivityService with IssuesService with LabelsService
|
||||
with MilestonesService with RepositoryService with PrioritiesService with PullRequestService with CommitsService
|
||||
with WebHookPullRequestService with WebHookPullRequestReviewCommentService {}
|
||||
with WebHookPullRequestService with WebHookPullRequestReviewCommentService with RequestCache {}
|
||||
val branch = "master"
|
||||
val issueId = 10
|
||||
def initRepository(owner: String, name: String): File = {
|
||||
|
||||
@@ -18,7 +18,8 @@ class PullRequestServiceSpec
|
||||
with PrioritiesService
|
||||
with WebHookService
|
||||
with WebHookPullRequestService
|
||||
with WebHookPullRequestReviewCommentService {
|
||||
with WebHookPullRequestReviewCommentService
|
||||
with RequestCache {
|
||||
|
||||
def swap(r: (Issue, PullRequest)) = (r._2 -> r._1)
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ trait ServiceSpecBase extends MockitoSugar {
|
||||
lazy val dummyService = new RepositoryService with AccountService with ActivityService with IssuesService
|
||||
with MergeService with PullRequestService with CommitsService with CommitStatusService with LabelsService
|
||||
with MilestonesService with PrioritiesService with WebHookService with WebHookPullRequestService
|
||||
with WebHookPullRequestReviewCommentService {
|
||||
with WebHookPullRequestReviewCommentService with RequestCache {
|
||||
override def fetchAsPullRequest(
|
||||
userName: String,
|
||||
repositoryName: String,
|
||||
|
||||
@@ -7,7 +7,7 @@ import gitbucket.core.model.WebHookContentType
|
||||
class WebHookServiceSpec extends FunSuite with ServiceSpecBase {
|
||||
lazy val service = new WebHookPullRequestService with AccountService with ActivityService with RepositoryService
|
||||
with MergeService with PullRequestService with IssuesService with CommitsService with LabelsService
|
||||
with MilestonesService with PrioritiesService with WebHookPullRequestReviewCommentService
|
||||
with MilestonesService with PrioritiesService with WebHookPullRequestReviewCommentService with RequestCache
|
||||
|
||||
test("WebHookPullRequestService.getPullRequestsByRequestForWebhook") {
|
||||
withTestDB { implicit session =>
|
||||
|
||||
@@ -169,8 +169,9 @@ class AvatarImageProviderSpec extends FunSpec with MockitoSugar {
|
||||
context: Context
|
||||
): Html = getAvatarImageHtml(userName, size, mailAddress, tooltip)
|
||||
|
||||
override def getAccountByMailAddress(mailAddress: String)(implicit context: Context): Option[Account] = account
|
||||
override def getAccountByUserName(userName: String)(implicit context: Context): Option[Account] = account
|
||||
override def getAccountByMailAddressFromCache(mailAddress: String)(implicit context: Context): Option[Account] =
|
||||
account
|
||||
override def getAccountByUserNameFromCache(userName: String)(implicit context: Context): Option[Account] = account
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user