muety / wakapi

📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics

Home Page:https://wakapi.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Support for Regex in Settings#Data

ysxninja opened this issue · comments

In Settings#Data Aliases:
Add the ability to specify aliases for any type of entity as regex.
For instance, to be able to define a rule, that all occurrences of .*\bmyapp\b.* e.g. myapp-frontend, myapp-dev, myapp-yetknownfuture are combined under a project called myapp.

hi @ysxninja, thanks for the idea. Will add this as a feature request!

Had some thoughts about this again. I have a fear that allowing arbitrary regexes from user input might become a security risk, e.g. because of the problem of catastrophic backtracking or potential regex injections.

I'm thinking about implementing glob-like wildcard patterns instead (e.g. app-*). This would be less powerful, but might still suffice for your use cases, @ysxninja @gingerbeardman?

Sure thing! I'll probably only use * anyway 😬