Provides support for linting git commit messages against Conventional Commits rules.
See tags to determine the latest available version. Then configure the plugin in your project as follows:
build.gradle
plugins {
id "com.star-zero.gradle.githook" version "1.2.0"
id "ru.netris.commitlint" version "1.4"
}
githook {
failOnMissingHooksDir = false
createHooksDirIfNotExist = false
hooks {
"commit-msg" {
task = "commitlint -Dmsgfile=\$1"
}
}
}
commitlint {
enforceRefs = false
}
settings.gradle
pluginManagement {
repositories {
gradlePluginPortal()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == "ru.netris.commitlint") {
useModule("ru.netris:commitlint-plugin:${requested.version}")
}
}
}
}