All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.octopusden.octopus.vcsfacade.issue.IssueKeyParser.kt Maven / Gradle / Ivy

There is a newer version: 3.0.21
Show newest version
package org.octopusden.octopus.vcsfacade.issue

object IssueKeyParser {
    private val maxProjectNameLength = 10
    private val projectKeyPattern = "(?:^|[^-a-zA-Z0-9])([a-zA-Z0-9]{1,$maxProjectNameLength}-\\d+)".toRegex()

    fun findIssueKeys(message: String) =
            projectKeyPattern.findAll(message).map { it.groups[1]!!.value }.toList().distinct()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy