muesli / beehive

A flexible event/agent & automation system with lots of bees 🐝
GNU Affero General Public License v3.0
6.29k stars 320 forks source link

Filter negation #360

Open fukawi2 opened 3 years ago

fukawi2 commented 3 years ago

Apologies if this is in the docs, but I couldn't find it.

Is it possible to negate filters? For example, one of my filters I want to ignore GitHub issues with a certain prefix in the title. I'm aware of ne to negate a whole string, but I want to negate a prefix filter in this instance:

"Filters": [
    "{{test not HasPrefix .title \"IDontCare:\"}}",
    "{{test ne .username \"fukawi2\"}}"
]

Beehive hasn't complained about the above syntax, but I'm not sure if it will actually work or not?