The Unified and Autonomous Development Platform
feat: conventional commits: regex improvements for summary (#1401)
Robin Shen4a818d3c51d8
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.javaindex 99701e0dab..f95bb1afa6 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@@ -41,7 +41,7 @@ public class BranchProtection implements Serializable {private static final long serialVersionUID = 1L;private static final Pattern CONVENTIONAL_COMMIT_SUBJECT = Pattern.compile(- "^(([a-zA-Z]+)(\\(([a-zA-Z]+([\\-/ ][a-zA-Z]+)*)\\))?!?: [^ ].+)|^(revert \".*\")",+ "^((\\p{L}+)(\\((\\p{L}+([\\-/ ]\\p{L}+)*)\\))?!?: [^ ].+)|^(revert \".*\")",UNICODE_CHARACTER_CLASS | CASE_INSENSITIVE);private boolean enabled = true;