Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
Show First 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | final class DiffusionRepositoryEditEngine | ||||
protected function buildCustomEditFields($object) { | protected function buildCustomEditFields($object) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
$policies = id(new PhabricatorPolicyQuery()) | $policies = id(new PhabricatorPolicyQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->setObject($object) | ->setObject($object) | ||||
->execute(); | ->execute(); | ||||
$fetch_value = $object->getFetchRules(); | |||||
$track_value = $object->getTrackOnlyRules(); | $track_value = $object->getTrackOnlyRules(); | ||||
$autoclose_value = $object->getAutocloseOnlyRules(); | $autoclose_value = $object->getAutocloseOnlyRules(); | ||||
$automation_instructions = pht( | $automation_instructions = pht( | ||||
"Configure **Repository Automation** to allow Phabricator to ". | "Configure **Repository Automation** to allow Phabricator to ". | ||||
"write to this repository.". | "write to this repository.". | ||||
"\n\n". | "\n\n". | ||||
"IMPORTANT: This feature is new, experimental, and not supported. ". | "IMPORTANT: This feature is new, experimental, and not supported. ". | ||||
▲ Show 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | return array( | ||||
PhabricatorRepositoryDefaultBranchTransaction::TRANSACTIONTYPE) | PhabricatorRepositoryDefaultBranchTransaction::TRANSACTIONTYPE) | ||||
->setIsCopyable(true) | ->setIsCopyable(true) | ||||
->setDescription(pht('Default branch name.')) | ->setDescription(pht('Default branch name.')) | ||||
->setConduitDescription(pht('Set the default branch name.')) | ->setConduitDescription(pht('Set the default branch name.')) | ||||
->setConduitTypeDescription(pht('New default branch name.')) | ->setConduitTypeDescription(pht('New default branch name.')) | ||||
->setValue($object->getDetail('default-branch')), | ->setValue($object->getDetail('default-branch')), | ||||
id(new PhabricatorTextAreaEditField()) | id(new PhabricatorTextAreaEditField()) | ||||
->setIsStringList(true) | ->setIsStringList(true) | ||||
->setKey('fetchRefs') | |||||
->setLabel(pht('Fetch Refs')) | |||||
->setTransactionType( | |||||
PhabricatorRepositoryFetchRefsTransaction::TRANSACTIONTYPE) | |||||
->setIsCopyable(true) | |||||
->setDescription(pht('Fetch only these refs.')) | |||||
->setConduitDescription(pht('Set the fetched refs.')) | |||||
->setConduitTypeDescription(pht('New fetched refs.')) | |||||
->setValue($fetch_value), | |||||
id(new PhabricatorTextAreaEditField()) | |||||
->setIsStringList(true) | |||||
->setKey('trackOnly') | ->setKey('trackOnly') | ||||
->setLabel(pht('Track Only')) | ->setLabel(pht('Track Only')) | ||||
->setTransactionType( | ->setTransactionType( | ||||
PhabricatorRepositoryTrackOnlyTransaction::TRANSACTIONTYPE) | PhabricatorRepositoryTrackOnlyTransaction::TRANSACTIONTYPE) | ||||
->setIsCopyable(true) | ->setIsCopyable(true) | ||||
->setDescription(pht('Track only these branches.')) | ->setDescription(pht('Track only these branches.')) | ||||
->setConduitDescription(pht('Set the tracked branches.')) | ->setConduitDescription(pht('Set the tracked branches.')) | ||||
->setConduitTypeDescription(pht('New tracked branches.')) | ->setConduitTypeDescription(pht('New tracked branches.')) | ||||
▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines |