Differential D12997 Diff 31356 src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php
| Show All 17 Lines | final class PhabricatorDiffusionConfigOptions | ||||
| public function getGroup() { | public function getGroup() { | ||||
| return 'apps'; | return 'apps'; | ||||
| } | } | ||||
| public function getOptions() { | public function getOptions() { | ||||
| $custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType'; | $custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType'; | ||||
| $fields = array( | $fields = array( | ||||
| new PhabricatorCommitRepositoryField(), | |||||
| new PhabricatorCommitBranchesField(), | new PhabricatorCommitBranchesField(), | ||||
| new PhabricatorCommitTagsField(), | new PhabricatorCommitTagsField(), | ||||
| new PhabricatorCommitMergedCommitsField(), | new PhabricatorCommitMergedCommitsField(), | ||||
| ); | ); | ||||
| $default_fields = array(); | $default_fields = array(); | ||||
| foreach ($fields as $field) { | foreach ($fields as $field) { | ||||
| $default_fields[$field->getFieldKey()] = array( | $default_fields[$field->getFieldKey()] = array( | ||||
| ▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | return array( | ||||
| 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) | $this->newOption('diffusion.fields', $custom_field_type, $default_fields) | ||||
| ->setCustomData( | ->setCustomData( | ||||
| id(new PhabricatorRepositoryCommit()) | id(new PhabricatorRepositoryCommit()) | ||||
| ->getCustomFieldBaseClass()) | ->getCustomFieldBaseClass()) | ||||
| ->setDescription(pht( | ->setDescription( | ||||
| pht( | |||||
| "Select and reorder diffusion fields.\n\n". | "Select and reorder diffusion fields.\n\n". | ||||
| "These will primarily show up in Mail Notifications.")), | "These will primarily show up in Mail Notifications.")), | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||