mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52: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',
|
||||
'PhabricatorRepositoryActivateTransaction' => 'applications/repository/xaction/PhabricatorRepositoryActivateTransaction.php',
|
||||
'PhabricatorRepositoryAuditRequest' => 'applications/repository/storage/PhabricatorRepositoryAuditRequest.php',
|
||||
'PhabricatorRepositoryAutocloseOnlyTransaction' => 'applications/repository/xaction/PhabricatorRepositoryAutocloseOnlyTransaction.php',
|
||||
'PhabricatorRepositoryBlueprintsTransaction' => 'applications/repository/xaction/PhabricatorRepositoryBlueprintsTransaction.php',
|
||||
'PhabricatorRepositoryBranch' => 'applications/repository/storage/PhabricatorRepositoryBranch.php',
|
||||
'PhabricatorRepositoryCallsignTransaction' => 'applications/repository/xaction/PhabricatorRepositoryCallsignTransaction.php',
|
||||
|
@ -4397,6 +4396,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorRepositoryNotifyTransaction' => 'applications/repository/xaction/PhabricatorRepositoryNotifyTransaction.php',
|
||||
'PhabricatorRepositoryOldRef' => 'applications/repository/storage/PhabricatorRepositoryOldRef.php',
|
||||
'PhabricatorRepositoryParsedChange' => 'applications/repository/data/PhabricatorRepositoryParsedChange.php',
|
||||
'PhabricatorRepositoryPermanentRefsTransaction' => 'applications/repository/xaction/PhabricatorRepositoryPermanentRefsTransaction.php',
|
||||
'PhabricatorRepositoryPullEngine' => 'applications/repository/engine/PhabricatorRepositoryPullEngine.php',
|
||||
'PhabricatorRepositoryPullEvent' => 'applications/repository/storage/PhabricatorRepositoryPullEvent.php',
|
||||
'PhabricatorRepositoryPullEventPHIDType' => 'applications/repository/phid/PhabricatorRepositoryPullEventPHIDType.php',
|
||||
|
@ -10553,7 +10553,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorRepositoryDAO',
|
||||
'PhabricatorPolicyInterface',
|
||||
),
|
||||
'PhabricatorRepositoryAutocloseOnlyTransaction' => 'PhabricatorRepositoryTransactionType',
|
||||
'PhabricatorRepositoryBlueprintsTransaction' => 'PhabricatorRepositoryTransactionType',
|
||||
'PhabricatorRepositoryBranch' => 'PhabricatorRepositoryDAO',
|
||||
'PhabricatorRepositoryCallsignTransaction' => 'PhabricatorRepositoryTransactionType',
|
||||
|
@ -10661,6 +10660,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPolicyInterface',
|
||||
),
|
||||
'PhabricatorRepositoryParsedChange' => 'Phobject',
|
||||
'PhabricatorRepositoryPermanentRefsTransaction' => 'PhabricatorRepositoryTransactionType',
|
||||
'PhabricatorRepositoryPullEngine' => 'PhabricatorRepositoryEngine',
|
||||
'PhabricatorRepositoryPullEvent' => array(
|
||||
'PhabricatorRepositoryDAO',
|
||||
|
|
|
@ -214,7 +214,7 @@ final class DiffusionRepositoryEditEngine
|
|||
|
||||
$fetch_value = $object->getFetchRules();
|
||||
$track_value = $object->getTrackOnlyRules();
|
||||
$permanent_value = $object->getAutocloseOnlyRules();
|
||||
$permanent_value = $object->getPermanentRefRules();
|
||||
|
||||
$automation_instructions = pht(
|
||||
"Configure **Repository Automation** to allow Phabricator to ".
|
||||
|
@ -392,7 +392,7 @@ final class DiffusionRepositoryEditEngine
|
|||
->setKey('permanentRefs')
|
||||
->setLabel(pht('Permanent Refs'))
|
||||
->setTransactionType(
|
||||
PhabricatorRepositoryAutocloseOnlyTransaction::TRANSACTIONTYPE)
|
||||
PhabricatorRepositoryPermanentRefsTransaction::TRANSACTIONTYPE)
|
||||
->setIsCopyable(true)
|
||||
->setDescription(pht('Only these refs are considered permanent.'))
|
||||
->setConduitDescription(pht('Set the permanent refs.'))
|
||||
|
|
|
@ -24,7 +24,7 @@ final class DiffusionRepositoryBranchesManagementPanel
|
|||
$has_any =
|
||||
$repository->getDetail('default-branch') ||
|
||||
$repository->getTrackOnlyRules() ||
|
||||
$repository->getAutocloseOnlyRules();
|
||||
$repository->getPermanentRefRules();
|
||||
|
||||
if ($has_any) {
|
||||
return 'fa-code-fork';
|
||||
|
@ -102,7 +102,7 @@ final class DiffusionRepositoryBranchesManagementPanel
|
|||
$permanent_display =
|
||||
phutil_tag('em', array(), pht('Publishing Disabled'));
|
||||
} else {
|
||||
$permanent_rules = $repository->getAutocloseOnlyRules();
|
||||
$permanent_rules = $repository->getPermanentRefRules();
|
||||
if ($permanent_rules) {
|
||||
$permanent_display = implode(', ', $permanent_rules);
|
||||
} else {
|
||||
|
|
|
@ -1197,11 +1197,11 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
|||
return null;
|
||||
}
|
||||
|
||||
public function getAutocloseOnlyRules() {
|
||||
public function getPermanentRefRules() {
|
||||
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);
|
||||
$this->setDetail('close-commits-filter', $rules);
|
||||
return $this;
|
||||
|
@ -2846,7 +2846,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
|||
public function getFieldValuesForConduit() {
|
||||
$fetch_rules = $this->getFetchRules();
|
||||
$track_rules = $this->getTrackOnlyRules();
|
||||
$permanent_rules = $this->getAutocloseOnlyRules();
|
||||
$permanent_rules = $this->getPermanentRefRules();
|
||||
|
||||
$fetch_rules = $this->getStringListForConduit($fetch_rules);
|
||||
$track_rules = $this->getStringListForConduit($track_rules);
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorRepositoryAutocloseOnlyTransaction
|
||||
final class PhabricatorRepositoryPermanentRefsTransaction
|
||||
extends PhabricatorRepositoryTransactionType {
|
||||
|
||||
const TRANSACTIONTYPE = 'repo:autoclose-only';
|
||||
|
||||
public function generateOldValue($object) {
|
||||
return $object->getAutocloseOnlyRules();
|
||||
return $object->getPermanentRefRules();
|
||||
}
|
||||
|
||||
public function applyInternalEffects($object, $value) {
|
||||
$object->setAutocloseOnlyRules($value);
|
||||
$object->setPermanentRefRules($value);
|
||||
}
|
||||
|
||||
public function getTitle() {
|
Loading…
Reference in a new issue