diff --git a/src/main/kotlin/git/semver/plugin/changelog/ChangeLogFormatter.kt b/src/main/kotlin/git/semver/plugin/changelog/ChangeLogFormatter.kt index 12f5fbe..b50f29d 100644 --- a/src/main/kotlin/git/semver/plugin/changelog/ChangeLogFormatter.kt +++ b/src/main/kotlin/git/semver/plugin/changelog/ChangeLogFormatter.kt @@ -9,7 +9,7 @@ data class ChangeLogFormatter( companion object { private const val SCOPE = "Scope" private const val TYPE = "Type" - private const val MESSAGE = "Message" + private const val DESCRIPTION = "Description" } fun formatLog(changeLog: List, settings: SemverSettings, changeLogTexts: ChangeLogTexts): String { @@ -57,7 +57,7 @@ data class ChangeLogFormatter( isBreakingChange, it.groupValue(TYPE), it.groupValue(SCOPE), - it.groupValue(MESSAGE) + it.groupValue(DESCRIPTION) ) } ?: CommitInfo(commits, text, isBreakingChange) } @@ -70,7 +70,7 @@ data class ChangeLogFormatter( val isBreaking: Boolean, val type: String? = null, val scope: String? = null, - val message: String? = null + val description: String? = null ) class Context { diff --git a/src/main/kotlin/git/semver/plugin/changelog/ChangeLogTexts.kt b/src/main/kotlin/git/semver/plugin/changelog/ChangeLogTexts.kt index 72df790..b9fd828 100644 --- a/src/main/kotlin/git/semver/plugin/changelog/ChangeLogTexts.kt +++ b/src/main/kotlin/git/semver/plugin/changelog/ChangeLogTexts.kt @@ -63,11 +63,11 @@ open class ChangeLogTexts( var sortByText: Boolean = true - var changeLogPattern: String = "(?m)^(?\\w+)(?:\\((?[^()]+)\\))?!?:\\s*(?.*)$" + var changeLogPattern: String = "(?m)^(?\\w+)(?:\\((?[^()]+)\\))?!?:\\s*(?.*)$" var headerFormat: (ChangeLogFormatter.CommitInfo) -> String = { commitInfo -> - (commitInfo.message ?: commitInfo.text).lineSequence().first() + (commitInfo.description ?: commitInfo.text).lineSequence().first() } var fullHeaderFormat: (ChangeLogFormatter.CommitInfo) -> String = { commitInfo -> commitInfo.text.lineSequence().first()