mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 13:35:50 +01:00
Merge branch 'closing-issues-via-commit-messages' of https://github.com/odz/gitbucket into odz-closing-issues-via-commit-messages
This commit is contained in:
@@ -141,6 +141,14 @@ class CommitLogHook(owner: String, repository: String, pusher: String, baseUrl:
|
||||
}
|
||||
}
|
||||
|
||||
// close issues
|
||||
val defaultBranch = getRepository(owner, repository, baseURL).get.repository.defaultBranch
|
||||
if(refName(1) == "heads" && branchName == defaultBranch && command.getType == ReceiveCommand.Type.UPDATE){
|
||||
git.log.addRange(command.getOldId, command.getNewId).call.asScala.foreach { commit =>
|
||||
closeIssuesFromMessage(commit.getFullMessage, pusher, owner, repository)
|
||||
}
|
||||
}
|
||||
|
||||
// call web hook
|
||||
getWebHookURLs(owner, repository) match {
|
||||
case webHookURLs if(webHookURLs.nonEmpty) =>
|
||||
|
||||
Reference in New Issue
Block a user