@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
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove host/path and test plan enable/disable options

Summary: Ref T2222. These no longer have an effect, and are obsoleted by `differential.fields`.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2222

Differential Revision: https://secure.phabricator.com/D8468

+9 -83
-14
conf/default.conf.php
··· 796 796 797 797 'differential.field-selector' => 'DifferentialDefaultFieldSelector', 798 798 799 - // Differential can show "Host" and "Path" fields on revisions, with 800 - // information about the machine and working directory where the 801 - // change came from. These fields are disabled by default because they may 802 - // occasionally have sensitive information; you can set this to true to 803 - // enable them. 804 - 'differential.show-host-field' => false, 805 - 806 - // Differential has a required "Test Plan" field by default, which requires 807 - // authors to fill out information about how they verified the correctness of 808 - // their changes when sending code for review. If you'd prefer not to use 809 - // this field, you can disable it here. You can also make it optional 810 - // (instead of required) below. 811 - 'differential.show-test-plan-field' => true, 812 - 813 799 // Differential has a required "Test Plan" field by default. You can make it 814 800 // optional by setting this to false. You can also completely remove it above, 815 801 // if you prefer.
+7
src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
··· 150 150 'Sessions now expire and are garbage collected rather than having an '. 151 151 'arbitrary concurrency limit.'); 152 152 153 + $differential_field_reason = pht( 154 + 'All Differential fields are now managed through the configuration '. 155 + 'option "%s". Use that option to configure which fields are shown.', 156 + 'differential.fields'); 157 + 153 158 $ancient_config += array( 154 159 'phid.external-loaders' => 155 160 pht( ··· 182 187 'Phabricator now manages typeahead strategies automatically.'), 183 188 'differential.revision-custom-detail-renderer' => pht( 184 189 'Obsolete; use standard rendering events instead.'), 190 + 'differential.show-host-field' => $differential_field_reason, 191 + 'differential.show-test-plan-field' => $differential_field_reason, 185 192 ); 186 193 187 194 return $ancient_config;
-31
src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
··· 83 83 'DifferentialDefaultFieldSelector') 84 84 ->setBaseClass('DifferentialFieldSelector') 85 85 ->setDescription(pht('Field selector class')), 86 - $this->newOption('differential.show-host-field', 'bool', false) 87 - ->setBoolOptions( 88 - array( 89 - pht('Show "Host" Fields'), 90 - pht('Hide "Host" Fields'), 91 - )) 92 - ->setSummary(pht('Show or hide the "Host" and "Path" fields.')) 93 - ->setDescription( 94 - pht( 95 - 'Differential can show "Host" and "Path" fields on revisions, '. 96 - 'with information about the machine and working directory where '. 97 - 'the change came from. These fields are disabled by default '. 98 - 'because they may occasionally have sensitive information, but '. 99 - 'they can be useful if you work in an environment with shared '. 100 - 'development machines. You can set this option to true to enable '. 101 - 'these fields.')), 102 - $this->newOption('differential.show-test-plan-field', 'bool', true) 103 - ->setBoolOptions( 104 - array( 105 - pht('Show "Test Plan" Field'), 106 - pht('Hide "Test Plan" Field'), 107 - )) 108 - ->setSummary(pht('Show or hide the "Test Plan" field.')) 109 - ->setDescription( 110 - pht( 111 - 'Differential has a required "Test Plan" field by default, which '. 112 - 'requires authors to fill out information about how they verified '. 113 - 'the correctness of their changes when they send code for review. '. 114 - 'If you would prefer not to use this field, you can disable it '. 115 - 'here. You can also make it optional (instead of required) by '. 116 - 'setting {{differential.require-test-plan-field}}.')), 117 86 $this->newOption('differential.require-test-plan-field', 'bool', true) 118 87 ->setBoolOptions( 119 88 array(
-17
src/applications/differential/field/specification/DifferentialHostFieldSpecification.php
··· 3 3 final class DifferentialHostFieldSpecification 4 4 extends DifferentialFieldSpecification { 5 5 6 - public function shouldAppearOnRevisionView() { 7 - return PhabricatorEnv::getEnvConfig('differential.show-host-field'); 8 - } 9 - 10 - public function renderLabelForRevisionView() { 11 - return 'Host:'; 12 - } 13 - 14 - public function renderValueForRevisionView() { 15 - $diff = $this->getManualDiff(); 16 - $host = $diff->getSourceMachine(); 17 - if (!$host) { 18 - return null; 19 - } 20 - return $host; 21 - } 22 - 23 6 }
-19
src/applications/differential/field/specification/DifferentialPathFieldSpecification.php
··· 3 3 final class DifferentialPathFieldSpecification 4 4 extends DifferentialFieldSpecification { 5 5 6 - public function shouldAppearOnRevisionView() { 7 - return PhabricatorEnv::getEnvConfig('differential.show-host-field'); 8 - } 9 - 10 - public function renderLabelForRevisionView() { 11 - return 'Path:'; 12 - } 13 - 14 - public function renderValueForRevisionView() { 15 - $diff = $this->getManualDiff(); 16 - 17 - $path = $diff->getSourcePath(); 18 - if (!$path) { 19 - return null; 20 - } 21 - 22 - return $path; 23 - } 24 - 25 6 }
+2 -2
src/applications/differential/field/specification/DifferentialTestPlanFieldSpecification.php
··· 9 9 private $error = false; 10 10 11 11 public function shouldAppearOnEdit() { 12 - return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field'); 12 + return false; 13 13 } 14 14 15 15 protected function didSetRevision() { ··· 53 53 } 54 54 55 55 public function shouldAppearOnCommitMessage() { 56 - return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field'); 56 + return false; 57 57 } 58 58 59 59 public function getCommitMessageKey() {