Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<Commit>, settings: SemverSettings, changeLogTexts: ChangeLogTexts): String {
Expand Down Expand Up @@ -57,7 +57,7 @@ data class ChangeLogFormatter(
isBreakingChange,
it.groupValue(TYPE),
it.groupValue(SCOPE),
it.groupValue(MESSAGE)
it.groupValue(DESCRIPTION)
)
} ?: CommitInfo(commits, text, isBreakingChange)
}
Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/git/semver/plugin/changelog/ChangeLogTexts.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ open class ChangeLogTexts(

var sortByText: Boolean = true

var changeLogPattern: String = "(?m)^(?<Type>\\w+)(?:\\((?<Scope>[^()]+)\\))?!?:\\s*(?<Message>.*)$"
var changeLogPattern: String = "(?m)^(?<Type>\\w+)(?:\\((?<Scope>[^()]+)\\))?!?:\\s*(?<Description>.*)$"


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()
Expand Down
Loading