Differential D12993 Diff 31340 src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php
| Show All 14 Lines | public function getFontIcon() { | ||||
| return 'fa-code'; | return 'fa-code'; | ||||
| } | } | ||||
| public function getGroup() { | public function getGroup() { | ||||
| return 'apps'; | return 'apps'; | ||||
| } | } | ||||
| public function getOptions() { | public function getOptions() { | ||||
| $custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType'; | |||||
| $fields = array( | |||||
| new PhabricatorCommitBranchesField(), | |||||
| new PhabricatorCommitTagsField(), | |||||
| new PhabricatorCommitMergedCommitsField(), | |||||
| ); | |||||
| $default_fields = array(); | |||||
| foreach ($fields as $field) { | |||||
| $default_fields[$field->getFieldKey()] = array( | |||||
| 'disabled' => $field->shouldDisableByDefault(), | |||||
| ); | |||||
| } | |||||
| return array( | return array( | ||||
| $this->newOption( | $this->newOption( | ||||
| 'metamta.diffusion.subject-prefix', | 'metamta.diffusion.subject-prefix', | ||||
| 'string', | 'string', | ||||
| '[Diffusion]') | '[Diffusion]') | ||||
| ->setDescription(pht('Subject prefix for Diffusion mail.')), | ->setDescription(pht('Subject prefix for Diffusion mail.')), | ||||
| $this->newOption( | $this->newOption( | ||||
| 'metamta.diffusion.attach-patches', | 'metamta.diffusion.attach-patches', | ||||
| ▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | return array( | ||||
| ->setLocked(true) | ->setLocked(true) | ||||
| ->setSummary(pht('Host for SSH connections to repositories.')) | ->setSummary(pht('Host for SSH connections to repositories.')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht( | pht( | ||||
| 'If you accept Phabricator SSH traffic on a different host '. | 'If you accept Phabricator SSH traffic on a different host '. | ||||
| 'from web traffic (for example, if you use different SSH and '. | 'from web traffic (for example, if you use different SSH and '. | ||||
| 'web load balancers), you can set the SSH hostname here. This '. | 'web load balancers), you can set the SSH hostname here. This '. | ||||
| 'is an advanced option.')), | 'is an advanced option.')), | ||||
| $this->newOption('diffusion.fields', $custom_field_type, $default_fields) | |||||
| ->setCustomData( | |||||
| id(new PhabricatorRepositoryCommit()) | |||||
| ->getCustomFieldBaseClass()) | |||||
| ->setDescription(pht( | |||||
| "Select and reorder diffusion fields.\n\n". | |||||
| "These will primarily show up in Mail Notifications.")), | |||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||