(refs #2)Record 'open pull request' activity.

This commit is contained in:
takezoe
2013-07-14 03:27:59 +09:00
parent 62f2defd91
commit 3a7e2c0249
2 changed files with 12 additions and 3 deletions

View File

@@ -13,12 +13,12 @@ import scala.Some
import util.JGitUtil.CommitInfo
class PullRequestsController extends PullRequestsControllerBase
with RepositoryService with AccountService with IssuesService with PullRequestService with MilestonesService
with RepositoryService with AccountService with IssuesService with PullRequestService with MilestonesService with ActivityService
with ReferrerAuthenticator with CollaboratorsAuthenticator
trait PullRequestsControllerBase extends ControllerBase {
self: ReferrerAuthenticator with RepositoryService with IssuesService with MilestonesService
with PullRequestService with CollaboratorsAuthenticator =>
self: RepositoryService with IssuesService with MilestonesService with ActivityService with PullRequestService
with ReferrerAuthenticator with CollaboratorsAuthenticator =>
val form = mapping(
"title" -> trim(label("Title" , text(required, maxlength(100)))),
@@ -130,6 +130,8 @@ trait PullRequestsControllerBase extends ControllerBase {
repository.name,
form.requestCommitId)
recordPullRequestActivity(repository.owner, repository.name, loginUserName, issueId, form.title)
redirect(s"/${repository.owner}/${repository.name}/pulls/${issueId}")
})