Created
August 26, 2016 12:10
-
-
Save NikitaMelnikov/ab21ca43a54532295de509f9bf71921c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Commit(id: String, title: String) | |
val taskNamePattern = "[a-zA-Z]{3,4}-[0-9]{3,4}".r | |
val commits = Seq( | |
Commit("1", "TST-123"), | |
Commit("1", "TST-123"), | |
Commit("2", "TST-2234"), | |
Commit("3", "TST-31234"), | |
Commit("4", "TST-4232"), | |
Commit("5", "TST-523"), | |
Commit("5", "TST123123123123-5 nkajsdnkajsnd") | |
) | |
commits flatMap (c => taskNamePattern.findFirstIn(c.title)) map ("jira/" + _) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment