From 9107c2e26208210cedf490d7ac10e476ab2281c7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 15 Apr 2019 09:44:39 -0700 Subject: [PATCH] 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 --- .../herald/DiffusionCommitAutocloseHeraldField.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/applications/diffusion/herald/DiffusionCommitAutocloseHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitAutocloseHeraldField.php index c620b18778..787446ee6a 100644 --- a/src/applications/diffusion/herald/DiffusionCommitAutocloseHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitAutocloseHeraldField.php @@ -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() { -- 2.51.2