Skip to content

Commit 0fdde50

Browse files
chore: add conventional commits and signed commit git hooks
1 parent 0f5be77 commit 0fdde50

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

.idea/codeStyles/Project.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle.kts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,36 @@
66
* https://opensource.org/licenses/MIT.
77
*/
88

9+
plugins {
10+
id("com.gradle.enterprise") version "3.12.4"
11+
id("org.danilopianini.gradle-pre-commit-git-hooks") version "1.1.5"
12+
}
13+
914
rootProject.name = "automation-management-microservice"
1015

16+
gradleEnterprise {
17+
buildScan {
18+
termsOfServiceUrl = "https://gradle.com/terms-of-service"
19+
termsOfServiceAgree = "yes"
20+
publishOnFailure() // Always publish Gradle Build Scan if there is a failure.
21+
}
22+
}
23+
24+
gitHooks {
25+
preCommit {
26+
}
27+
28+
commitMsg {
29+
conventionalCommits()
30+
}
31+
32+
hook("post-commit") {
33+
from {
34+
"git verify-commit HEAD &> /dev/null; " +
35+
"if (( $? == 1 )); then echo -e '\\033[0;31mWARNING(COMMIT UNVERIFIED): commit NOT signed\\033[0m';" +
36+
"else echo -e '\\033[0;32mOK COMMIT SIGNED\\033[0m'; fi"
37+
}
38+
}
39+
40+
createHooks(true)
41+
}

0 commit comments

Comments
 (0)