Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

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

  • 4 отговора
  • 1 има този проблем
  • Последен отговор от rebate_refrain212

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?

Всички отговори (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/

Полезно?

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?

Полезно?

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:

Полезно?

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.

Полезно?

Задаване на въпрос

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