mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-12-23 00:39:53 +01:00
(refs #1643)Create issue reference comment
even if it can't relate committer’s email with GitBucket account
This commit is contained in:
@@ -455,9 +455,8 @@ trait IssuesService {
|
|||||||
def createIssueComment(owner: String, repository: String, commit: CommitInfo)(implicit s: Session): Unit = {
|
def createIssueComment(owner: String, repository: String, commit: CommitInfo)(implicit s: Session): Unit = {
|
||||||
extractIssueId(commit.fullMessage).foreach { issueId =>
|
extractIssueId(commit.fullMessage).foreach { issueId =>
|
||||||
if(getIssue(owner, repository, issueId).isDefined){
|
if(getIssue(owner, repository, issueId).isDefined){
|
||||||
getAccountByMailAddress(commit.committerEmailAddress).foreach { account =>
|
val userName = getAccountByMailAddress(commit.committerEmailAddress).map(_.userName).getOrElse(commit.committerName)
|
||||||
createComment(owner, repository, account.userName, issueId.toInt, commit.fullMessage + " " + commit.id, "commit")
|
createComment(owner, repository, userName, issueId.toInt, commit.fullMessage + " " + commit.id, "commit")
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user