(refs #60)Mentioned issue reference from other issue or issue comment.

This commit is contained in:
takezoe
2014-02-22 05:13:39 +09:00
parent 0ccb753892
commit 39091240ff
4 changed files with 52 additions and 7 deletions

View File

@@ -45,4 +45,14 @@ object StringUtil {
case e => e
}
}
/**
* Extract issue id like ````#issueId``` from the given message.
*
*@param message the message which may contains issue id
* @return the iterator of issue id
*/
def extractIssueId(message: String): Iterator[String] =
"(^|\\W)#(\\d+)(\\W|$)".r.findAllIn(message).matchData.map { matchData => matchData.group(2) }
}