mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
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
This commit is contained in:
parent
9e8bbdb3a2
commit
77af6be803
6 changed files with 9 additions and 83 deletions
|
@ -796,20 +796,6 @@ return array(
|
||||||
|
|
||||||
'differential.field-selector' => 'DifferentialDefaultFieldSelector',
|
'differential.field-selector' => 'DifferentialDefaultFieldSelector',
|
||||||
|
|
||||||
// Differential can show "Host" and "Path" fields on revisions, with
|
|
||||||
// information about the machine and working directory where the
|
|
||||||
// change came from. These fields are disabled by default because they may
|
|
||||||
// occasionally have sensitive information; you can set this to true to
|
|
||||||
// enable them.
|
|
||||||
'differential.show-host-field' => false,
|
|
||||||
|
|
||||||
// Differential has a required "Test Plan" field by default, which requires
|
|
||||||
// authors to fill out information about how they verified the correctness of
|
|
||||||
// their changes when sending code for review. If you'd prefer not to use
|
|
||||||
// this field, you can disable it here. You can also make it optional
|
|
||||||
// (instead of required) below.
|
|
||||||
'differential.show-test-plan-field' => true,
|
|
||||||
|
|
||||||
// Differential has a required "Test Plan" field by default. You can make it
|
// Differential has a required "Test Plan" field by default. You can make it
|
||||||
// optional by setting this to false. You can also completely remove it above,
|
// optional by setting this to false. You can also completely remove it above,
|
||||||
// if you prefer.
|
// if you prefer.
|
||||||
|
|
|
@ -150,6 +150,11 @@ final class PhabricatorSetupCheckExtraConfig extends PhabricatorSetupCheck {
|
||||||
'Sessions now expire and are garbage collected rather than having an '.
|
'Sessions now expire and are garbage collected rather than having an '.
|
||||||
'arbitrary concurrency limit.');
|
'arbitrary concurrency limit.');
|
||||||
|
|
||||||
|
$differential_field_reason = pht(
|
||||||
|
'All Differential fields are now managed through the configuration '.
|
||||||
|
'option "%s". Use that option to configure which fields are shown.',
|
||||||
|
'differential.fields');
|
||||||
|
|
||||||
$ancient_config += array(
|
$ancient_config += array(
|
||||||
'phid.external-loaders' =>
|
'phid.external-loaders' =>
|
||||||
pht(
|
pht(
|
||||||
|
@ -182,6 +187,8 @@ final class PhabricatorSetupCheckExtraConfig extends PhabricatorSetupCheck {
|
||||||
'Phabricator now manages typeahead strategies automatically.'),
|
'Phabricator now manages typeahead strategies automatically.'),
|
||||||
'differential.revision-custom-detail-renderer' => pht(
|
'differential.revision-custom-detail-renderer' => pht(
|
||||||
'Obsolete; use standard rendering events instead.'),
|
'Obsolete; use standard rendering events instead.'),
|
||||||
|
'differential.show-host-field' => $differential_field_reason,
|
||||||
|
'differential.show-test-plan-field' => $differential_field_reason,
|
||||||
);
|
);
|
||||||
|
|
||||||
return $ancient_config;
|
return $ancient_config;
|
||||||
|
|
|
@ -83,37 +83,6 @@ final class PhabricatorDifferentialConfigOptions
|
||||||
'DifferentialDefaultFieldSelector')
|
'DifferentialDefaultFieldSelector')
|
||||||
->setBaseClass('DifferentialFieldSelector')
|
->setBaseClass('DifferentialFieldSelector')
|
||||||
->setDescription(pht('Field selector class')),
|
->setDescription(pht('Field selector class')),
|
||||||
$this->newOption('differential.show-host-field', 'bool', false)
|
|
||||||
->setBoolOptions(
|
|
||||||
array(
|
|
||||||
pht('Show "Host" Fields'),
|
|
||||||
pht('Hide "Host" Fields'),
|
|
||||||
))
|
|
||||||
->setSummary(pht('Show or hide the "Host" and "Path" fields.'))
|
|
||||||
->setDescription(
|
|
||||||
pht(
|
|
||||||
'Differential can show "Host" and "Path" fields on revisions, '.
|
|
||||||
'with information about the machine and working directory where '.
|
|
||||||
'the change came from. These fields are disabled by default '.
|
|
||||||
'because they may occasionally have sensitive information, but '.
|
|
||||||
'they can be useful if you work in an environment with shared '.
|
|
||||||
'development machines. You can set this option to true to enable '.
|
|
||||||
'these fields.')),
|
|
||||||
$this->newOption('differential.show-test-plan-field', 'bool', true)
|
|
||||||
->setBoolOptions(
|
|
||||||
array(
|
|
||||||
pht('Show "Test Plan" Field'),
|
|
||||||
pht('Hide "Test Plan" Field'),
|
|
||||||
))
|
|
||||||
->setSummary(pht('Show or hide the "Test Plan" field.'))
|
|
||||||
->setDescription(
|
|
||||||
pht(
|
|
||||||
'Differential has a required "Test Plan" field by default, which '.
|
|
||||||
'requires authors to fill out information about how they verified '.
|
|
||||||
'the correctness of their changes when they send code for review. '.
|
|
||||||
'If you would prefer not to use this field, you can disable it '.
|
|
||||||
'here. You can also make it optional (instead of required) by '.
|
|
||||||
'setting {{differential.require-test-plan-field}}.')),
|
|
||||||
$this->newOption('differential.require-test-plan-field', 'bool', true)
|
$this->newOption('differential.require-test-plan-field', 'bool', true)
|
||||||
->setBoolOptions(
|
->setBoolOptions(
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -3,21 +3,4 @@
|
||||||
final class DifferentialHostFieldSpecification
|
final class DifferentialHostFieldSpecification
|
||||||
extends DifferentialFieldSpecification {
|
extends DifferentialFieldSpecification {
|
||||||
|
|
||||||
public function shouldAppearOnRevisionView() {
|
|
||||||
return PhabricatorEnv::getEnvConfig('differential.show-host-field');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function renderLabelForRevisionView() {
|
|
||||||
return 'Host:';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function renderValueForRevisionView() {
|
|
||||||
$diff = $this->getManualDiff();
|
|
||||||
$host = $diff->getSourceMachine();
|
|
||||||
if (!$host) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return $host;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,23 +3,4 @@
|
||||||
final class DifferentialPathFieldSpecification
|
final class DifferentialPathFieldSpecification
|
||||||
extends DifferentialFieldSpecification {
|
extends DifferentialFieldSpecification {
|
||||||
|
|
||||||
public function shouldAppearOnRevisionView() {
|
|
||||||
return PhabricatorEnv::getEnvConfig('differential.show-host-field');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function renderLabelForRevisionView() {
|
|
||||||
return 'Path:';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function renderValueForRevisionView() {
|
|
||||||
$diff = $this->getManualDiff();
|
|
||||||
|
|
||||||
$path = $diff->getSourcePath();
|
|
||||||
if (!$path) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $path;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ final class DifferentialTestPlanFieldSpecification
|
||||||
private $error = false;
|
private $error = false;
|
||||||
|
|
||||||
public function shouldAppearOnEdit() {
|
public function shouldAppearOnEdit() {
|
||||||
return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field');
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function didSetRevision() {
|
protected function didSetRevision() {
|
||||||
|
@ -53,7 +53,7 @@ final class DifferentialTestPlanFieldSpecification
|
||||||
}
|
}
|
||||||
|
|
||||||
public function shouldAppearOnCommitMessage() {
|
public function shouldAppearOnCommitMessage() {
|
||||||
return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field');
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCommitMessageKey() {
|
public function getCommitMessageKey() {
|
||||||
|
|
Loading…
Reference in a new issue