mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-02 11:36:05 +01:00
(refs #2)Merge comment is displayed on the comment list (but it's not included in comment count).
This commit is contained in:
@@ -106,12 +106,16 @@ trait PullRequestsControllerBase extends ControllerBase {
|
|||||||
try {
|
try {
|
||||||
// mark issue as merged and close.
|
// mark issue as merged and close.
|
||||||
val loginAccount = context.loginAccount.get
|
val loginAccount = context.loginAccount.get
|
||||||
createComment(repository.owner, repository.name, loginAccount.userName, issueId, "Merge", "merge")
|
createComment(repository.owner, repository.name, loginAccount.userName, issueId, form.message, "merge")
|
||||||
createComment(repository.owner, repository.name, loginAccount.userName, issueId, "Close", "close")
|
createComment(repository.owner, repository.name, loginAccount.userName, issueId, "Close", "close")
|
||||||
updateClosed(repository.owner, repository.name, issueId, true)
|
updateClosed(repository.owner, repository.name, issueId, true)
|
||||||
|
|
||||||
|
// record activity
|
||||||
recordMergeActivity(repository.owner, repository.name, loginAccount.userName, issueId, form.message)
|
recordMergeActivity(repository.owner, repository.name, loginAccount.userName, issueId, form.message)
|
||||||
|
|
||||||
// fetch pull request to working repository
|
// TODO apply ref comment
|
||||||
|
|
||||||
|
// fetch pull request to temporary working repository
|
||||||
val pullRequestBranchName = s"gitbucket-pullrequest-${issueId}"
|
val pullRequestBranchName = s"gitbucket-pullrequest-${issueId}"
|
||||||
|
|
||||||
git.fetch
|
git.fetch
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
@import context._
|
@import context._
|
||||||
@import view.helpers._
|
@import view.helpers._
|
||||||
@comments.map { comment =>
|
@comments.map { comment =>
|
||||||
@if(comment.action != "close" && comment.action != "reopen" && comment.action != "merge"){
|
@if(comment.action != "close" && comment.action != "reopen"){
|
||||||
<div class="issue-avatar-image">@avatar(comment.commentedUserName, 48)</div>
|
<div class="issue-avatar-image">@avatar(comment.commentedUserName, 48)</div>
|
||||||
<div class="box issue-comment-box" id="comment-@comment.commentId">
|
<div class="box issue-comment-box" id="comment-@comment.commentId">
|
||||||
<div class="box-header-small">
|
<div class="box-header-small">
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<a href="@url(comment.commentedUserName)" class="username strong">@comment.commentedUserName</a> commented
|
<a href="@url(comment.commentedUserName)" class="username strong">@comment.commentedUserName</a> commented
|
||||||
<span class="pull-right">
|
<span class="pull-right">
|
||||||
@datetime(comment.registeredDate)
|
@datetime(comment.registeredDate)
|
||||||
@if(comment.action != "commit" && (hasWritePermission || loginAccount.map(_.userName == comment.commentedUserName).getOrElse(false))){
|
@if(comment.action != "commit" && comment.action != "merge" && (hasWritePermission || loginAccount.map(_.userName == comment.commentedUserName).getOrElse(false))){
|
||||||
<a href="#" data-comment-id="@comment.commentId"><i class="icon-pencil"></i></a>
|
<a href="#" data-comment-id="@comment.commentId"><i class="icon-pencil"></i></a>
|
||||||
}
|
}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user