mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 15:05:50 +01:00
(refs #60)Mentioned issue reference from other issue or issue comment.
This commit is contained in:
@@ -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) }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user