HomePhabricator

Add "does not match regexp" to Herald

Description

Add "does not match regexp" to Herald

Summary:
Fixes T10330.

  • Anywhere we support "matches regexp", also allow "does not match regexp". Although you can sometimes write a clever negative regexp, these rules are better expressed with "does not match <simple regexp>" anyway, and sometimes no regexp will work.
  • Always allow "does not contain" when we support "contains".
  • Fix some JS issues with certain rules affecting custom fields.

Test Plan:

  • Wrote an "Affected files do not match regexp" rule that required every diff to touch "MANUALCHANGELOG.md".
  • Tried to diff without the file; rejected.
  • Tried to diff with the file; accepted.
  • Wrote a bunch of "contains" and "does not contain" rules against text fields and custom fields, then edited tasks to trigger/observe them.
  • Swapped the editor into custom text, user, remarkup, etc fields, no more JS errors.

Screen Shot 2016-02-11 at 3.17.21 PM.png (509×1 px, 68 KB)

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10330

Differential Revision: https://secure.phabricator.com/D15254

Details

Provenance
epriestleyAuthored on Feb 11 2016, 11:17 PM
epriestleyPushed on Feb 11 2016, 11:29 PM
Reviewer
chad
Differential Revision
D15254: Add "does not match regexp" to Herald
Parents
rP86611708191c: Fix a couple typos in "why so many databases?" document
Branches
Unknown
Tags
Unknown
Tasks
T10330: Herald condition for "Affected files does /not/ contain"
Build Status
Buildable 10651
Build 13077: Run Core Tests