Add the commit link to refs comment.

This commit is contained in:
takezoe
2013-10-24 04:25:50 +09:00
parent 0d0bf4ad3f
commit 2968b92677
2 changed files with 9 additions and 2 deletions

View File

@@ -149,7 +149,7 @@ class CommitLogHook(owner: String, repository: String, userName: String, baseURL
"(^|\\W)#(\\d+)(\\W|$)".r.findAllIn(commit.fullMessage).matchData.foreach { matchData =>
val issueId = matchData.group(2)
if(getAccountByUserName(commit.committer).isDefined && getIssue(owner, repository, issueId).isDefined){
createComment(owner, repository, commit.committer, issueId.toInt, commit.fullMessage, "commit")
createComment(owner, repository, commit.committer, issueId.toInt, commit.id + " " + commit.fullMessage, "commit")
}
}
}