]> diplodocus.org Git - minc/commit
undocumented lightly tested support for CODE ref filters master
authorepg Gillespie <epg@google.com>
Sat, 3 May 2014 00:58:38 +0000 (17:58 -0700)
committerepg Gillespie <epg@google.com>
Sat, 3 May 2014 00:58:38 +0000 (17:58 -0700)
commit20fc2041a308c92709a2bff6bd58d43bc1943804
tree1cedb07ebb9343f2775ea0772834df43471ff0df
parent53237e78cea6b9432f4f0fdc5c640dbeacd0ce16
undocumented lightly tested support for CODE ref filters

For 11 years the simple filtering has been fine, but filtering of code review
mails at work finally requires something more complex quick example:

@FILTERS = (
  # Prioritize reviews to/cc me in special folder.
  sub {
      my $h = shift;
      match($h, ' TO', ['main-review-list', 't'])
          && match($h, ' TO', ['me', 't'])
          && return 'reviews';
  },
  # Isolate the spammy reviews.
  [' TO', ['hi-traffic-review-list', 'wharrgarbl']],

  # Other reviews follow normal rules below.
);
minc