mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 17:02:41 +01:00
Rename some internal "Autoclose" mentions to "Permanent Refs"
Summary: Depends on D20428. Ref T13277. Test Plan: Grep / reading. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13277 Differential Revision: https://secure.phabricator.com/D20432
This commit is contained in:
parent
d1223ac577
commit
6449a0ecb2
5 changed files with 12 additions and 12 deletions
|
@ -4321,7 +4321,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorRepository' => 'applications/repository/storage/PhabricatorRepository.php',
|
'PhabricatorRepository' => 'applications/repository/storage/PhabricatorRepository.php',
|
||||||
'PhabricatorRepositoryActivateTransaction' => 'applications/repository/xaction/PhabricatorRepositoryActivateTransaction.php',
|
'PhabricatorRepositoryActivateTransaction' => 'applications/repository/xaction/PhabricatorRepositoryActivateTransaction.php',
|
||||||
'PhabricatorRepositoryAuditRequest' => 'applications/repository/storage/PhabricatorRepositoryAuditRequest.php',
|
'PhabricatorRepositoryAuditRequest' => 'applications/repository/storage/PhabricatorRepositoryAuditRequest.php',
|
||||||
'PhabricatorRepositoryAutocloseOnlyTransaction' => 'applications/repository/xaction/PhabricatorRepositoryAutocloseOnlyTransaction.php',
|
|
||||||
'PhabricatorRepositoryBlueprintsTransaction' => 'applications/repository/xaction/PhabricatorRepositoryBlueprintsTransaction.php',
|
'PhabricatorRepositoryBlueprintsTransaction' => 'applications/repository/xaction/PhabricatorRepositoryBlueprintsTransaction.php',
|
||||||
'PhabricatorRepositoryBranch' => 'applications/repository/storage/PhabricatorRepositoryBranch.php',
|
'PhabricatorRepositoryBranch' => 'applications/repository/storage/PhabricatorRepositoryBranch.php',
|
||||||
'PhabricatorRepositoryCallsignTransaction' => 'applications/repository/xaction/PhabricatorRepositoryCallsignTransaction.php',
|
'PhabricatorRepositoryCallsignTransaction' => 'applications/repository/xaction/PhabricatorRepositoryCallsignTransaction.php',
|
||||||
|
@ -4397,6 +4396,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorRepositoryNotifyTransaction' => 'applications/repository/xaction/PhabricatorRepositoryNotifyTransaction.php',
|
'PhabricatorRepositoryNotifyTransaction' => 'applications/repository/xaction/PhabricatorRepositoryNotifyTransaction.php',
|
||||||
'PhabricatorRepositoryOldRef' => 'applications/repository/storage/PhabricatorRepositoryOldRef.php',
|
'PhabricatorRepositoryOldRef' => 'applications/repository/storage/PhabricatorRepositoryOldRef.php',
|
||||||
'PhabricatorRepositoryParsedChange' => 'applications/repository/data/PhabricatorRepositoryParsedChange.php',
|
'PhabricatorRepositoryParsedChange' => 'applications/repository/data/PhabricatorRepositoryParsedChange.php',
|
||||||
|
'PhabricatorRepositoryPermanentRefsTransaction' => 'applications/repository/xaction/PhabricatorRepositoryPermanentRefsTransaction.php',
|
||||||
'PhabricatorRepositoryPullEngine' => 'applications/repository/engine/PhabricatorRepositoryPullEngine.php',
|
'PhabricatorRepositoryPullEngine' => 'applications/repository/engine/PhabricatorRepositoryPullEngine.php',
|
||||||
'PhabricatorRepositoryPullEvent' => 'applications/repository/storage/PhabricatorRepositoryPullEvent.php',
|
'PhabricatorRepositoryPullEvent' => 'applications/repository/storage/PhabricatorRepositoryPullEvent.php',
|
||||||
'PhabricatorRepositoryPullEventPHIDType' => 'applications/repository/phid/PhabricatorRepositoryPullEventPHIDType.php',
|
'PhabricatorRepositoryPullEventPHIDType' => 'applications/repository/phid/PhabricatorRepositoryPullEventPHIDType.php',
|
||||||
|
@ -10553,7 +10553,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorRepositoryDAO',
|
'PhabricatorRepositoryDAO',
|
||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
),
|
),
|
||||||
'PhabricatorRepositoryAutocloseOnlyTransaction' => 'PhabricatorRepositoryTransactionType',
|
|
||||||
'PhabricatorRepositoryBlueprintsTransaction' => 'PhabricatorRepositoryTransactionType',
|
'PhabricatorRepositoryBlueprintsTransaction' => 'PhabricatorRepositoryTransactionType',
|
||||||
'PhabricatorRepositoryBranch' => 'PhabricatorRepositoryDAO',
|
'PhabricatorRepositoryBranch' => 'PhabricatorRepositoryDAO',
|
||||||
'PhabricatorRepositoryCallsignTransaction' => 'PhabricatorRepositoryTransactionType',
|
'PhabricatorRepositoryCallsignTransaction' => 'PhabricatorRepositoryTransactionType',
|
||||||
|
@ -10661,6 +10660,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
),
|
),
|
||||||
'PhabricatorRepositoryParsedChange' => 'Phobject',
|
'PhabricatorRepositoryParsedChange' => 'Phobject',
|
||||||
|
'PhabricatorRepositoryPermanentRefsTransaction' => 'PhabricatorRepositoryTransactionType',
|
||||||
'PhabricatorRepositoryPullEngine' => 'PhabricatorRepositoryEngine',
|
'PhabricatorRepositoryPullEngine' => 'PhabricatorRepositoryEngine',
|
||||||
'PhabricatorRepositoryPullEvent' => array(
|
'PhabricatorRepositoryPullEvent' => array(
|
||||||
'PhabricatorRepositoryDAO',
|
'PhabricatorRepositoryDAO',
|
||||||
|
|
|
@ -214,7 +214,7 @@ final class DiffusionRepositoryEditEngine
|
||||||
|
|
||||||
$fetch_value = $object->getFetchRules();
|
$fetch_value = $object->getFetchRules();
|
||||||
$track_value = $object->getTrackOnlyRules();
|
$track_value = $object->getTrackOnlyRules();
|
||||||
$permanent_value = $object->getAutocloseOnlyRules();
|
$permanent_value = $object->getPermanentRefRules();
|
||||||
|
|
||||||
$automation_instructions = pht(
|
$automation_instructions = pht(
|
||||||
"Configure **Repository Automation** to allow Phabricator to ".
|
"Configure **Repository Automation** to allow Phabricator to ".
|
||||||
|
@ -392,7 +392,7 @@ final class DiffusionRepositoryEditEngine
|
||||||
->setKey('permanentRefs')
|
->setKey('permanentRefs')
|
||||||
->setLabel(pht('Permanent Refs'))
|
->setLabel(pht('Permanent Refs'))
|
||||||
->setTransactionType(
|
->setTransactionType(
|
||||||
PhabricatorRepositoryAutocloseOnlyTransaction::TRANSACTIONTYPE)
|
PhabricatorRepositoryPermanentRefsTransaction::TRANSACTIONTYPE)
|
||||||
->setIsCopyable(true)
|
->setIsCopyable(true)
|
||||||
->setDescription(pht('Only these refs are considered permanent.'))
|
->setDescription(pht('Only these refs are considered permanent.'))
|
||||||
->setConduitDescription(pht('Set the permanent refs.'))
|
->setConduitDescription(pht('Set the permanent refs.'))
|
||||||
|
|
|
@ -24,7 +24,7 @@ final class DiffusionRepositoryBranchesManagementPanel
|
||||||
$has_any =
|
$has_any =
|
||||||
$repository->getDetail('default-branch') ||
|
$repository->getDetail('default-branch') ||
|
||||||
$repository->getTrackOnlyRules() ||
|
$repository->getTrackOnlyRules() ||
|
||||||
$repository->getAutocloseOnlyRules();
|
$repository->getPermanentRefRules();
|
||||||
|
|
||||||
if ($has_any) {
|
if ($has_any) {
|
||||||
return 'fa-code-fork';
|
return 'fa-code-fork';
|
||||||
|
@ -102,7 +102,7 @@ final class DiffusionRepositoryBranchesManagementPanel
|
||||||
$permanent_display =
|
$permanent_display =
|
||||||
phutil_tag('em', array(), pht('Publishing Disabled'));
|
phutil_tag('em', array(), pht('Publishing Disabled'));
|
||||||
} else {
|
} else {
|
||||||
$permanent_rules = $repository->getAutocloseOnlyRules();
|
$permanent_rules = $repository->getPermanentRefRules();
|
||||||
if ($permanent_rules) {
|
if ($permanent_rules) {
|
||||||
$permanent_display = implode(', ', $permanent_rules);
|
$permanent_display = implode(', ', $permanent_rules);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1197,11 +1197,11 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAutocloseOnlyRules() {
|
public function getPermanentRefRules() {
|
||||||
return array_keys($this->getDetail('close-commits-filter', array()));
|
return array_keys($this->getDetail('close-commits-filter', array()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setAutocloseOnlyRules(array $rules) {
|
public function setPermanentRefRules(array $rules) {
|
||||||
$rules = array_fill_keys($rules, true);
|
$rules = array_fill_keys($rules, true);
|
||||||
$this->setDetail('close-commits-filter', $rules);
|
$this->setDetail('close-commits-filter', $rules);
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -2846,7 +2846,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
||||||
public function getFieldValuesForConduit() {
|
public function getFieldValuesForConduit() {
|
||||||
$fetch_rules = $this->getFetchRules();
|
$fetch_rules = $this->getFetchRules();
|
||||||
$track_rules = $this->getTrackOnlyRules();
|
$track_rules = $this->getTrackOnlyRules();
|
||||||
$permanent_rules = $this->getAutocloseOnlyRules();
|
$permanent_rules = $this->getPermanentRefRules();
|
||||||
|
|
||||||
$fetch_rules = $this->getStringListForConduit($fetch_rules);
|
$fetch_rules = $this->getStringListForConduit($fetch_rules);
|
||||||
$track_rules = $this->getStringListForConduit($track_rules);
|
$track_rules = $this->getStringListForConduit($track_rules);
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PhabricatorRepositoryAutocloseOnlyTransaction
|
final class PhabricatorRepositoryPermanentRefsTransaction
|
||||||
extends PhabricatorRepositoryTransactionType {
|
extends PhabricatorRepositoryTransactionType {
|
||||||
|
|
||||||
const TRANSACTIONTYPE = 'repo:autoclose-only';
|
const TRANSACTIONTYPE = 'repo:autoclose-only';
|
||||||
|
|
||||||
public function generateOldValue($object) {
|
public function generateOldValue($object) {
|
||||||
return $object->getAutocloseOnlyRules();
|
return $object->getPermanentRefRules();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyInternalEffects($object, $value) {
|
public function applyInternalEffects($object, $value) {
|
||||||
$object->setAutocloseOnlyRules($value);
|
$object->setPermanentRefRules($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
Loading…
Reference in a new issue