diff --git a/src/main/scala/app/PullRequestsController.scala b/src/main/scala/app/PullRequestsController.scala index 922227d..3d6f97b 100644 --- a/src/main/scala/app/PullRequestsController.scala +++ b/src/main/scala/app/PullRequestsController.scala @@ -105,7 +105,8 @@ try { // TODO mark issue as 'merged' val loginAccount = context.loginAccount.get - createComment(repository.owner, repository.name, loginAccount.userName, issueId, "Closed", "close") + createComment(repository.owner, repository.name, loginAccount.userName, issueId, "Merge", "merge") + createComment(repository.owner, repository.name, loginAccount.userName, issueId, "Close", "close") updateClosed(repository.owner, repository.name, issueId, true) recordMergeActivity(repository.owner, repository.name, loginAccount.userName, issueId, form.message) diff --git a/src/main/twirl/issues/issue.scala.html b/src/main/twirl/issues/issue.scala.html index f51c6f8..b4038a8 100644 --- a/src/main/twirl/issues/issue.scala.html +++ b/src/main/twirl/issues/issue.scala.html @@ -116,12 +116,14 @@ @if(comment.action == "close" || comment.action == "close_comment"){
Closed + @avatar(comment.commentedUserName, 20) @comment.commentedUserName closed the issue @datetime(comment.registeredDate)
} @if(comment.action == "reopen" || comment.action == "reopen_comment"){
Reopened + @avatar(comment.commentedUserName, 20) @comment.commentedUserName reopened the issue @datetime(comment.registeredDate)
} diff --git a/src/main/twirl/pulls/discussion.scala.html b/src/main/twirl/pulls/discussion.scala.html index ae3c702..3188f23 100644 --- a/src/main/twirl/pulls/discussion.scala.html +++ b/src/main/twirl/pulls/discussion.scala.html @@ -61,6 +61,7 @@ @comments.map { comment => + @if(comment.action != "close" && comment.action != "reopen" && comment.action != "merge"){
@avatar(comment.commentedUserName, 48)
@@ -77,20 +78,28 @@ @markdown(comment.content, repository, false, true)
-
- @if(comment.action == "close" || comment.action == "close_comment"){ -
- Closed - @comment.commentedUserName closed the issue @datetime(comment.registeredDate) -
- } - @if(comment.action == "reopen" || comment.action == "reopen_comment"){ -
- Reopened - @comment.commentedUserName reopened the issue @datetime(comment.registeredDate) -
- } + } + @if(comment.action == "merge"){ +
+ Merged + @avatar(comment.commentedUserName, 20) + @comment.commentedUserName merged the pull request @datetime(comment.registeredDate)
+ } + @if(comment.action == "close" || comment.action == "close_comment"){ +
+ Closed + @avatar(comment.commentedUserName, 20) + @comment.commentedUserName closed the pull request @datetime(comment.registeredDate) +
+ } + @if(comment.action == "reopen" || comment.action == "reopen_comment"){ +
+ Reopened + @avatar(comment.commentedUserName, 20) + @comment.commentedUserName reopened the issue @datetime(comment.registeredDate) +
+ } } @if(hasWritePermission && !issue.closed){
@@ -184,7 +193,11 @@
@if(issue.closed) { - Closed + @if(comments.exists(_.action == "merge")){ + Merged + } else { + Closed + } } else { Open } diff --git a/src/main/twirl/pulls/pullreq.scala.html b/src/main/twirl/pulls/pullreq.scala.html index a8b41e4..57bee0e 100644 --- a/src/main/twirl/pulls/pullreq.scala.html +++ b/src/main/twirl/pulls/pullreq.scala.html @@ -13,7 +13,7 @@ @import context._ @import view.helpers._ @html.main("%s - Pull Request #%d - %s/%s".format(issue.title, issue.issueId, repository.owner, repository.name)){ - @html.header("issues", repository) + @html.header("pulls", repository)