@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class DiffusionCommitAutocloseHeraldField
4 extends DiffusionCommitHeraldField {
5
6 const FIELDCONST = 'diffusion.commit.autoclose';
7
8 public function getFieldGroupKey() {
9 return HeraldDeprecatedFieldGroup::FIELDGROUPKEY;
10 }
11
12 public function getHeraldFieldName() {
13 // Herald no longer triggers until a commit is reachable from a permanent
14 // ref, so this condition is always true by definition.
15 return pht('Commit Autocloses (Deprecated)');
16 }
17
18 public function getHeraldFieldValue($object) {
19 return true;
20 }
21
22 public function getHeraldFieldConditions() {
23 return array(
24 HeraldAdapter::CONDITION_UNCONDITIONALLY,
25 );
26 }
27
28 public function getHeraldFieldValueType($condition) {
29 return new HeraldEmptyFieldValue();
30 }
31
32}