Skip to content

The Unified and Autonomous Development Platform

fix: Conventional commits: German umlaut (ä, ö, ...) in scope (and possibly type) not allowed (#1372)

Robin Shene6104f76afce
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 967578a748..6946046c47 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
@@ -38,7 +38,9 @@ public class BranchProtection implements Serializable {
private static final long serialVersionUID = 1L;
private static final Pattern CONVENTIONAL_COMMIT_SUBJECT =
- Pattern.compile("([\\w\\-.]+)\\s*(\\(([\\w\\s\\-./,]+)\\)\\s*)?(!\\s*)?:.+");
+ Pattern.compile(
+ "([\\w\\-.]+)\\s*(\\(([\\w\\s\\-./,]+)\\)\\s*)?(!\\s*)?:.+",
+ Pattern.UNICODE_CHARACTER_CLASS);
private boolean enabled = true;