mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 20:40:56 +01:00
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
This commit is contained in:
parent
c3d9c28382
commit
6b1ec35cf3
2 changed files with 12 additions and 8 deletions
|
@ -199,21 +199,31 @@ abstract class HeraldAdapter {
|
|||
);
|
||||
case self::FIELD_AUTHOR:
|
||||
case self::FIELD_COMMITTER:
|
||||
case self::FIELD_REPOSITORY:
|
||||
case self::FIELD_REVIEWER:
|
||||
return array(
|
||||
self::CONDITION_IS_ANY,
|
||||
self::CONDITION_IS_NOT_ANY,
|
||||
);
|
||||
case self::FIELD_REPOSITORY:
|
||||
return array(
|
||||
self::CONDITION_IS_ANY,
|
||||
self::CONDITION_IS_NOT_ANY,
|
||||
self::CONDITION_EXISTS,
|
||||
self::CONDITION_NOT_EXISTS,
|
||||
);
|
||||
case self::FIELD_TAGS:
|
||||
case self::FIELD_REVIEWERS:
|
||||
case self::FIELD_CC:
|
||||
case self::FIELD_AUTHOR_PROJECTS:
|
||||
case self::FIELD_PROJECTS:
|
||||
case self::FIELD_AFFECTED_PACKAGE:
|
||||
case self::FIELD_AFFECTED_PACKAGE_OWNER:
|
||||
return array(
|
||||
self::CONDITION_INCLUDE_ALL,
|
||||
self::CONDITION_INCLUDE_ANY,
|
||||
self::CONDITION_INCLUDE_NONE,
|
||||
self::CONDITION_EXISTS,
|
||||
self::CONDITION_NOT_EXISTS,
|
||||
);
|
||||
case self::FIELD_DIFF_FILE:
|
||||
return array(
|
||||
|
@ -233,12 +243,6 @@ abstract class HeraldAdapter {
|
|||
self::CONDITION_RULE,
|
||||
self::CONDITION_NOT_RULE,
|
||||
);
|
||||
case self::FIELD_AFFECTED_PACKAGE:
|
||||
case self::FIELD_AFFECTED_PACKAGE_OWNER:
|
||||
return array(
|
||||
self::CONDITION_INCLUDE_ANY,
|
||||
self::CONDITION_INCLUDE_NONE,
|
||||
);
|
||||
case self::FIELD_CONTENT_SOURCE:
|
||||
return array(
|
||||
self::CONDITION_IS,
|
||||
|
|
|
@ -16,7 +16,7 @@ final class HeraldRule extends HeraldDAO
|
|||
protected $ruleType;
|
||||
protected $isDisabled = 0;
|
||||
|
||||
protected $configVersion = 14;
|
||||
protected $configVersion = 15;
|
||||
|
||||
private $ruleApplied = self::ATTACHABLE; // phids for which this rule has been applied
|
||||
private $validAuthor = self::ATTACHABLE;
|
||||
|
|
Loading…
Reference in a new issue