@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Allow Herald text list fields to use "Exists" / "Does not exist" conditions

Summary: This makes it more natural to write Herald rules about commits that appear on any or no branches.

Test Plan: Wrote a commit rule for commits on any branch, ran it with `bin/repository reparse --herald <commit>`, saw expected results in web UI.

Reviewers: chad

Reviewed By: chad

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

+9 -1
+9 -1
src/applications/herald/field/HeraldField.php
··· 80 80 HeraldAdapter::CONDITION_NOT_CONTAINS, 81 81 HeraldAdapter::CONDITION_REGEXP, 82 82 HeraldAdapter::CONDITION_NOT_REGEXP, 83 + HeraldAdapter::CONDITION_EXISTS, 84 + HeraldAdapter::CONDITION_NOT_EXISTS, 83 85 ); 84 86 case self::STANDARD_TEXT_MAP: 85 87 return array( ··· 107 109 case self::STANDARD_TEXT: 108 110 case self::STANDARD_TEXT_LIST: 109 111 case self::STANDARD_TEXT_MAP: 110 - return new HeraldTextFieldValue(); 112 + switch ($condition) { 113 + case HeraldAdapter::CONDITION_EXISTS: 114 + case HeraldAdapter::CONDITION_NOT_EXISTS: 115 + return new HeraldEmptyFieldValue(); 116 + default: 117 + return new HeraldTextFieldValue(); 118 + } 111 119 case self::STANDARD_PHID: 112 120 case self::STANDARD_PHID_NULLABLE: 113 121 case self::STANDARD_PHID_LIST: