mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 21:45:50 +01:00
Insert issue comment from commit message as 'commit' action.
This commit is contained in:
@@ -85,7 +85,7 @@ class CommitLogHook(owner: String, repository: String, userName: String) extends
|
|||||||
"(^|\\W)#(\\d+)(\\W|$)".r.findAllIn(commit.fullMessage).matchData.foreach { matchData =>
|
"(^|\\W)#(\\d+)(\\W|$)".r.findAllIn(commit.fullMessage).matchData.foreach { matchData =>
|
||||||
val issueId = matchData.group(2)
|
val issueId = matchData.group(2)
|
||||||
if(getAccountByUserName(commit.committer).isDefined && getIssue(owner, repository, issueId).isDefined){
|
if(getAccountByUserName(commit.committer).isDefined && getIssue(owner, repository, issueId).isDefined){
|
||||||
createComment(owner, repository, commit.committer, issueId.toInt, commit.fullMessage, None)
|
createComment(owner, repository, commit.committer, issueId.toInt, commit.fullMessage, Some("commit"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some(commit)
|
Some(commit)
|
||||||
|
|||||||
Reference in New Issue
Block a user