Merge pull request #1864 from kounoike/pr-more-action-issuecomments

Save more actions as issue comments.
This commit is contained in:
Naoki Takezoe
2018-02-27 18:17:46 +09:00
committed by GitHub
14 changed files with 321 additions and 153 deletions

View File

@@ -4,7 +4,8 @@ import gitbucket.core.model._
import org.scalatest.FunSpec
class PullRequestServiceSpec extends FunSpec with ServiceSpecBase
with PullRequestService with IssuesService with AccountService with RepositoryService with CommitsService {
with PullRequestService with IssuesService with AccountService with RepositoryService with CommitsService
with LabelsService with MilestonesService with PrioritiesService {
def swap(r: (Issue, PullRequest)) = (r._2 -> r._1)

View File

@@ -45,7 +45,7 @@ trait ServiceSpecBase {
def user(name:String)(implicit s:Session):Account = AccountService.getAccountByUserName(name).get
lazy val dummyService = new RepositoryService with AccountService with IssuesService with PullRequestService
with CommitsService with CommitStatusService with LabelsService (){}
with CommitsService with CommitStatusService with LabelsService with MilestonesService with PrioritiesService (){}
def generateNewUserWithDBRepository(userName:String, repositoryName:String)(implicit s:Session):Account = {
val ac = AccountService.getAccountByUserName(userName).getOrElse(generateNewAccount(userName))

View File

@@ -6,7 +6,8 @@ import gitbucket.core.model.WebHookContentType
class WebHookServiceSpec extends FunSuite with ServiceSpecBase {
lazy val service = new WebHookPullRequestService with AccountService with RepositoryService with PullRequestService with IssuesService with CommitsService
lazy val service = new WebHookPullRequestService with AccountService with RepositoryService with PullRequestService
with IssuesService with CommitsService with LabelsService with MilestonesService with PrioritiesService
test("WebHookPullRequestService.getPullRequestsByRequestForWebhook") { withTestDB { implicit session =>
val user1 = generateNewUserWithDBRepository("user1","repo1")