@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 rules to check for revisions with no reviewers

Summary: Fixes T4225. Adds the NON_EXISTS condition to Herald for "Reviewers", and adds a few more conditions which have reasonable meanings.

Test Plan: Used test console to check a revision with reviewers, and another without reviewers. Both produced the expected results.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4225

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

+12 -8
+11 -7
src/applications/herald/adapter/HeraldAdapter.php
··· 199 199 ); 200 200 case self::FIELD_AUTHOR: 201 201 case self::FIELD_COMMITTER: 202 + case self::FIELD_REVIEWER: 203 + return array( 204 + self::CONDITION_IS_ANY, 205 + self::CONDITION_IS_NOT_ANY, 206 + ); 202 207 case self::FIELD_REPOSITORY: 203 - case self::FIELD_REVIEWER: 204 208 return array( 205 209 self::CONDITION_IS_ANY, 206 210 self::CONDITION_IS_NOT_ANY, 211 + self::CONDITION_EXISTS, 212 + self::CONDITION_NOT_EXISTS, 207 213 ); 208 214 case self::FIELD_TAGS: 209 215 case self::FIELD_REVIEWERS: 210 216 case self::FIELD_CC: 211 217 case self::FIELD_AUTHOR_PROJECTS: 212 218 case self::FIELD_PROJECTS: 219 + case self::FIELD_AFFECTED_PACKAGE: 220 + case self::FIELD_AFFECTED_PACKAGE_OWNER: 213 221 return array( 214 222 self::CONDITION_INCLUDE_ALL, 215 223 self::CONDITION_INCLUDE_ANY, 216 224 self::CONDITION_INCLUDE_NONE, 225 + self::CONDITION_EXISTS, 226 + self::CONDITION_NOT_EXISTS, 217 227 ); 218 228 case self::FIELD_DIFF_FILE: 219 229 return array( ··· 232 242 return array( 233 243 self::CONDITION_RULE, 234 244 self::CONDITION_NOT_RULE, 235 - ); 236 - case self::FIELD_AFFECTED_PACKAGE: 237 - case self::FIELD_AFFECTED_PACKAGE_OWNER: 238 - return array( 239 - self::CONDITION_INCLUDE_ANY, 240 - self::CONDITION_INCLUDE_NONE, 241 245 ); 242 246 case self::FIELD_CONTENT_SOURCE: 243 247 return array(
+1 -1
src/applications/herald/storage/HeraldRule.php
··· 16 16 protected $ruleType; 17 17 protected $isDisabled = 0; 18 18 19 - protected $configVersion = 14; 19 + protected $configVersion = 15; 20 20 21 21 private $ruleApplied = self::ATTACHABLE; // phids for which this rule has been applied 22 22 private $validAuthor = self::ATTACHABLE;