This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How do I filter by the presence/absence of a field?

more options

Gitlab adds a "X-GitLab-NotificationReason" field to the email headers, but only sometimes. I want to filter out messages that do not contain this header. How do I do it? The only operators I can see in the GUI are "contains", "doesn't contain", "is", "isn't", "begins with" and "ends with".

They don't take regexes or wildcards, do they? In that case maybe "is *" would work?

Gitlab adds a "X-GitLab-NotificationReason" field to the email headers, but only sometimes. I want to filter out messages that do not contain this header. How do I do it? The only operators I can see in the GUI are "contains", "doesn't contain", "is", "isn't", "begins with" and "ends with". They don't take regexes or wildcards, do they? In that case maybe "is *" would work?

All Replies (4)

more options

You might get a regex via the filtaquilla addon. It adds a lot of powerful options to filters, including Regex on subjects and header and javascript actions. It is like many advanced tools assuming you know what you are doing with a regex and javascript. https://addons.thunderbird.net/en-US/thunderbird/addon/filtaquilla/

Helpful?

more options

Ok, so in filterquilla does "property doesn't contain this regex" mean it'll match when the header property isn't present at all?

Helpful?

more options

I have no idea. I did not write the thing, nor do I actually claim to know what a regex is or does. If it was me I would just test it on a small collection of email to determine what is does.

Did you consult the documentation? https://quickfilters.quickfolders.org/filtaquilla.html Have a look at the open issues? https://github.com/RealRaven2000/FiltaQuilla/issues Use the support email in the link I provided? axel.grude@gmail.com

Alternatively you could simply check for the existence of the five possible values of the header rather than the simple presence of the header. Probably my preferred choice as it has so few possible values although a criteria specifying the header being not equal to " " may be enough or begins with is not "Z" would also work as none of the valid values begins with a Z. https://docs.gitlab.com/ee/user/profile/notifications.html#x-gitlab-notificationreason

X-GitLab-NotificationReason The X-GitLab-NotificationReason header contains the reason for the notification. The value is one of the following, in order of priority: own_activity assigned review_requested mentioned subscribed The reason for the notification is also included in the footer of the notification email. For example, an email with the reason assigned has this sentence in the footer:

Helpful?

more options

> nor do I actually claim to know what a regex is or does

See https://en.wikipedia.org/wiki/Regular_expression#POSIX_basic_and_extended

Anyway, filterquilla has turned out to be too slow, probably because regexes can be quite slow to run. I've ended up using two filters, one to filter by project and apply a tag for "peer review" and the specific project, and then another filter to move messages that have "peer review" but don't mention me.

Helpful?

Postavite pitanje

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.