Skip to content

The Unified and Autonomous Development Platform

chore: error message improvement for conventional commits validation

Robin Shenb635bd031ea4
diff --git a/server-core/src/main/java/io/onedev/server/model/support/code/BranchProtection.java b/server-core/src/main/java/io/onedev/server/model/support/code/BranchProtection.java
index 6946046c47..8fb83da286 100644
--- a/server-core/src/main/java/io/onedev/server/model/support/code/BranchProtection.java
+++ b/server-core/src/main/java/io/onedev/server/model/support/code/BranchProtection.java
@@ -420,14 +420,14 @@ public class BranchProtection implements Serializable {
return "Line 1: Scope not specified";
}
} else {
- return "Line 1: Subject is expected of format: <type>[optional scope][!]: <description>";
+ return "Line 1: Subject is expected of format: <type>[optional (scope)][!]: <description>";
}
for (int i=1; i<lines.size(); i++) {
var line = lines.get(i);
if (line.length() != 0) {
if (i != 2)
- return "One and only one blank line is expected between subject and body";
+ return "One and only one blank line is expected between subject and body/footer";
break;
}
}