Conventional commits: German umlaut (ä, ö, ...) in scope (and possibly type) not allowed (OD-1372)
Released
jbauer opened 1 year ago

Enable conventional commits, add type fix and leave scopes empty to allow any scope.

Pushing commit fix(ä): ö fails with message Line 1: Subject is expected of format: <type>[optional scope][!]: <description>

Pushing commit fix(a): ö works.

So only scope seems to be affected and maybe type (haven't tested it).

Also the error message might be a bit misleading because it does not show brackets () around the optional scope. Maybe it should be more like <type>[(<scope>)][!]: <description>.

jbauer commented 1 year ago

I think in your regex using \w, which is only a-zA-Z0-9_, you need to use unicode properties or Pattern.compile(regex, Pattern.UNICODE_CHARACTER_CLASS) to match letters of any language. Using \X might also do the trick.

See:

https://stackoverflow.com/questions/10894122/java-regex-for-support-unicode

jbauer commented 1 year ago

Hm maybe this could also seen as an improvement rather than a bug. I think many regex in OneDev will likely use \w and thus are only matching against US ASCII compatible text and not against Unicode letters of any language.

Robin Shen commented 1 year ago

Thanks for the investigation. Will fix this in next patch release.

OneDev changed state to 'Closed' 12 months ago
Previous Value Current Value
Open
Closed
OneDev commented 12 months ago

State changed as code fixing the issue is committed (e6104f76)

OneDev changed state to 'Released' 12 months ago
Previous Value Current Value
Closed
Released
OneDev commented 12 months ago

State changed as build #3638 is successful

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Affected Versions
8.2.0
Issue Votes (0)
Watchers (4)
Reference
OD-1372
Please wait...
Page is in error, reload to recover