mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-11 16:16:14 +01:00
9107c2e262
Summary: Depends on D20426. Ref T13277. The new behavior is to fire Herald only once a commit becomes reachable from a permanent ref (previously, an "Autoclose" branch). That means that every "Commit" Herald rule implicitly has this field as a condition, and it no longer does anything. Test Plan: Wrote a Herald rule, saw this as an option in the "Deprecated" section. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13277 Differential Revision: https://secure.phabricator.com/D20427
32 lines
778 B
PHP
32 lines
778 B
PHP
<?php
|
|
|
|
final class DiffusionCommitAutocloseHeraldField
|
|
extends DiffusionCommitHeraldField {
|
|
|
|
const FIELDCONST = 'diffusion.commit.autoclose';
|
|
|
|
public function getFieldGroupKey() {
|
|
return HeraldDeprecatedFieldGroup::FIELDGROUPKEY;
|
|
}
|
|
|
|
public function getHeraldFieldName() {
|
|
// Herald no longer triggers until a commit is reachable from a permanent
|
|
// ref, so this condition is always true by definition.
|
|
return pht('Commit Autocloses (Deprecated)');
|
|
}
|
|
|
|
public function getHeraldFieldValue($object) {
|
|
return true;
|
|
}
|
|
|
|
public function getHeraldFieldConditions() {
|
|
return array(
|
|
HeraldAdapter::CONDITION_UNCONDITIONALLY,
|
|
);
|
|
}
|
|
|
|
public function getHeraldFieldValueType($condition) {
|
|
return new HeraldEmptyFieldValue();
|
|
}
|
|
|
|
}
|