(refs #218)Separate StringUtil#extractCloseId() to add unit test.

This commit is contained in:
takezoe
2014-03-02 04:49:14 +09:00
parent 0c683d4f75
commit b031103df8
5 changed files with 37 additions and 13 deletions

View File

@@ -142,7 +142,7 @@ class CommitLogHook(owner: String, repository: String, pusher: String, baseUrl:
}
// close issues
val defaultBranch = getRepository(owner, repository, baseURL).get.repository.defaultBranch
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)