HomePhabricator

Add "Content type" and "Rule type" fields to Herald rules for Herald rules

Tags
None
Referenced Files
F5540308: Screen Shot 2018-04-24 at 3.37.32 PM.png
Apr 25 2018, 1:54 PM
F5540311: Screen Shot 2018-04-24 at 3.38.09 PM.png
Apr 25 2018, 1:54 PM
F5540309: Screen Shot 2018-04-24 at 3.37.50 PM.png
Apr 25 2018, 1:54 PM
F5540307: Screen Shot 2018-04-24 at 3.37.33 PM.png
Apr 25 2018, 1:54 PM
Subscribers
None

Description

Add "Content type" and "Rule type" fields to Herald rules for Herald rules

Summary:
Depends on D19400. Ref T13130. Currently, when you write Herald rules about other Herald rules, you can't pick a rule type or content type, so there's no way to get notified about edits to just global rules (which is the primary driving use case).

Add a "Content type" field to let the rule match rules that affect revisions, tasks, commits, etc.

Add a "Rule type" field to let the rule match global, personal, or object rules.

Test Plan:

  • Wrote a global rule for other rules about global Herald rules:

Screen Shot 2018-04-24 at 3.37.33 PM.png (1×1 px, 160 KB)

Screen Shot 2018-04-24 at 3.37.32 PM.png (1×1 px, 163 KB)

  • Ran it against itself which matched:

Screen Shot 2018-04-24 at 3.37.50 PM.png (1×1 px, 148 KB)

  • Ran it against another rule (not a global rule about Herald rules), which did not match:

Screen Shot 2018-04-24 at 3.38.09 PM.png (1×1 px, 141 KB)

  • Also reviewed the fields in those transcripts in more detail to make sure they were extracting matching correctly.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13130

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

Details