Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
| Show First 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | protected function buildCustomEditFields($object) { | ||||
| $policies = id(new PhabricatorPolicyQuery()) | $policies = id(new PhabricatorPolicyQuery()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->setObject($object) | ->setObject($object) | ||||
| ->execute(); | ->execute(); | ||||
| $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 ". | ||||
| "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. ". | ||||
| "Use it at your own risk."); | "Use it at your own risk."); | ||||
| ▲ Show 20 Lines • Show All 161 Lines • ▼ Show 20 Lines | return array( | ||||
| ->setConduitDescription(pht('Set the tracked branches.')) | ->setConduitDescription(pht('Set the tracked branches.')) | ||||
| ->setConduitTypeDescription(pht('New tracked branches.')) | ->setConduitTypeDescription(pht('New tracked branches.')) | ||||
| ->setValue($track_value), | ->setValue($track_value), | ||||
| id(new PhabricatorTextAreaEditField()) | id(new PhabricatorTextAreaEditField()) | ||||
| ->setIsStringList(true) | ->setIsStringList(true) | ||||
| ->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.')) | ||||
| ->setConduitTypeDescription(pht('New permanent ref rules.')) | ->setConduitTypeDescription(pht('New permanent ref rules.')) | ||||
| ->setValue($permanent_value), | ->setValue($permanent_value), | ||||
| id(new PhabricatorTextEditField()) | id(new PhabricatorTextEditField()) | ||||
| ->setKey('importOnly') | ->setKey('importOnly') | ||||
| ->setLabel(pht('Import Only')) | ->setLabel(pht('Import Only')) | ||||
| ▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines | |||||