1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Deprecate the "Commit is on autoclose/permanent branch" Herald "Commit" field

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
This commit is contained in:
epriestley 2019-04-15 09:44:39 -07:00
parent aed755e1d8
commit 9107c2e262

View file

@ -5,12 +5,18 @@ final class DiffusionCommitAutocloseHeraldField
const FIELDCONST = 'diffusion.commit.autoclose';
public function getFieldGroupKey() {
return HeraldDeprecatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldName() {
return pht('Commit is on permanent branch');
// 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 $object->getRepository()->shouldAutocloseCommit($object);
return true;
}
public function getHeraldFieldConditions() {