mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-03 12:12:43 +01:00
5f76c71d78
Ref T8726. This shares some target filtering code with the base class.
29 lines
786 B
PHP
29 lines
786 B
PHP
<?php
|
|
|
|
final class DifferentialReviewersAddBlockingSelfHeraldAction
|
|
extends DifferentialReviewersHeraldAction {
|
|
|
|
const ACTIONCONST = 'differential.reviewers.self.blocking';
|
|
|
|
public function getHeraldActionName() {
|
|
return pht('Add me as a blocking reviewer');
|
|
}
|
|
|
|
public function supportsRuleType($rule_type) {
|
|
return ($rule_type == HeraldRuleTypeConfig::RULE_TYPE_PERSONAL);
|
|
}
|
|
|
|
public function applyEffect($object, HeraldEffect $effect) {
|
|
$phid = $effect->getRule()->getAuthorPHID();
|
|
return $this->applyReviewers(array($phid), $is_blocking = true);
|
|
}
|
|
|
|
public function getHeraldActionStandardType() {
|
|
return self::STANDARD_NONE;
|
|
}
|
|
|
|
public function renderActionDescription($value) {
|
|
return pht('Add rule author as blocking reviewer.');
|
|
}
|
|
|
|
}
|