-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(devops): split changelog modules under code mods #8
- Loading branch information
Showing
22 changed files
with
109 additions
and
93 deletions.
There are no files selected for viewing
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
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
93 changes: 0 additions & 93 deletions
93
client/devops-genius/src/main/kotlin/org/changelog/ParserOptions.kt
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@Suppress("DSL_SCOPE_VIOLATION") | ||
plugins { | ||
java | ||
alias(libs.plugins.jvm) | ||
alias(libs.plugins.serialization) | ||
} | ||
|
||
dependencies { | ||
implementation(libs.kotlin.stdlib) | ||
implementation(libs.serialization.json) | ||
implementation(libs.logging.slf4j.api) | ||
|
||
testImplementation(libs.bundles.test) | ||
testRuntimeOnly(libs.test.junit.engine) | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
58 changes: 58 additions & 0 deletions
58
code-modules/git-commit-message/src/main/kotlin/org/changelog/ParserOptions.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package org.changelog | ||
|
||
data class ParserOptions( | ||
val commentChar: String? = null, | ||
val mergePattern: Regex? = null, | ||
val mergeCorrespondence: List<String>? = null, | ||
val headerPattern: Regex? = null, | ||
val breakingHeaderPattern: Regex? = null, | ||
val headerCorrespondence: List<String>? = null, | ||
val revertPattern: Regex? = null, | ||
val revertCorrespondence: List<String>? = null, | ||
val fieldPattern: Regex? = null, | ||
val noteKeywords: List<String>? = null, | ||
val notesPattern: ((String) -> Regex)? = null, | ||
val issuePrefixes: List<String>? = null, | ||
val issuePrefixesCaseSensitive: Boolean? = null, | ||
val referenceActions: List<String>? = null, | ||
) { | ||
companion object { | ||
fun defaultOptions(): ParserOptions { | ||
return ParserOptions( | ||
noteKeywords = listOf("BREAKING CHANGE", "BREAKING-CHANGE"), | ||
issuePrefixes = listOf("#"), | ||
referenceActions = listOf( | ||
"close", | ||
"closes", | ||
"closed", | ||
"fix", | ||
"fixes", | ||
"fixed", | ||
"resolve", | ||
"resolves", | ||
"resolved" | ||
), | ||
headerPattern = Regex("^(\\w*)(?:\\(([\\w$.*\\-*/ ]*)\\))?: (.*)$"), | ||
headerCorrespondence = listOf( | ||
"type", | ||
"scope", | ||
"subject" | ||
), | ||
revertPattern = Regex("^Revert\\s\"([\\s\\S]*)\"\\s*This reverts commit (\\w*)\\."), | ||
revertCorrespondence = listOf("header", "hash"), | ||
fieldPattern = Regex("^-(.*?)-$") | ||
) | ||
} | ||
} | ||
} | ||
|
||
// | ||
///** | ||
// * What warn function to use. For example, `console.warn.bind(console)`. By default, it's a noop. If it is `true`, it will error if commit cannot be parsed (strict). | ||
// */ | ||
//class ParserStreamOptions( | ||
// warn: Boolean? = null, | ||
// warnFunction: ((String) -> Unit)? = null, | ||
//) : ParserOptions( | ||
// | ||
//) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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