phorge/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php36e2d02d6ec5master
phorge/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php
36e2d02d6ec5master
PhabricatorDiffusionConfigOptions.php
PhabricatorDiffusionConfigOptions.php
b04a6a199951 | <?php | ||
---|---|---|---|
final class PhabricatorDiffusionConfigOptions | |||
extends PhabricatorApplicationConfigOptions { | |||
public function getName() { | |||
return pht('Diffusion'); | |||
} | |||
public function getDescription() { | |||
return pht('Configure Diffusion repository browsing.'); | |||
} | |||
99292c5c6a67 | public function getFontIcon() { | ||
return 'fa-code'; | |||
} | |||
ae7dc8b9d2ca | public function getGroup() { | ||
return 'apps'; | |||
} | |||
b04a6a199951 | public function getOptions() { | ||
return array( | |||
$this->newOption( | |||
'metamta.diffusion.subject-prefix', | |||
'string', | |||
'[Diffusion]') | |||
->setDescription(pht('Subject prefix for Diffusion mail.')), | |||
$this->newOption( | |||
'metamta.diffusion.attach-patches', | |||
'bool', | |||
false) | |||
->setBoolOptions( | |||
array( | |||
0a62f13464b8 | pht('Attach Patches'), | ||
pht('Do Not Attach Patches'), | |||
b04a6a199951 | )) | ||
36e2d02d6ec5 | ->setDescription( | ||
pht( | |||
'Set this to true if you want patches to be attached to commit '. | |||
'notifications from Diffusion.')), | |||
b04a6a199951 | $this->newOption('metamta.diffusion.inline-patches', 'int', 0) | ||
->setSummary(pht('Include patches in Diffusion mail as body text.')) | |||
->setDescription( | |||
pht( | |||
'To include patches in Diffusion email bodies, set this to a '. | |||
'positive integer. Patches will be inlined if they are at most '. | |||
'that many lines. By default, patches are not inlined.')), | |||
$this->newOption('metamta.diffusion.byte-limit', 'int', 1024 * 1024) | |||
->setDescription(pht('Hard byte limit on including patches in email.')), | |||
$this->newOption('metamta.diffusion.time-limit', 'int', 60) | |||
->setDescription(pht('Hard time limit on generating patches.')), | |||
b801ca8e6f7f | $this->newOption( | ||
'audit.can-author-close-audit', | |||
'bool', | |||
false) | |||
->setBoolOptions( | |||
array( | |||
0a62f13464b8 | pht('Enable Closing Audits'), | ||
pht('Disable Closing Audits'), | |||
b801ca8e6f7f | )) | ||
->setDescription(pht('Controls whether Author can Close Audits.')), | |||
6a5807eba44f | |||
791de0886f02 | $this->newOption('bugtraq.url', 'string', null) | ||
6a5807eba44f | ->addExample('https://bugs.php.net/%BUGID%', pht('PHP bugs')) | ||
->addExample('/%BUGID%', pht('Local Maniphest URL')) | |||
36e2d02d6ec5 | ->setDescription( | ||
pht( | |||
'URL of external bug tracker used by Diffusion. %s will be '. | |||
6a5807eba44f | 'substituted by the bug ID.', | ||
36e2d02d6ec5 | '%BUGID%')), | ||
7a39ac43b48c | $this->newOption('bugtraq.logregex', 'list<regex>', array()) | ||
->addExample(array('/\B#([1-9]\d*)\b/'), pht('Issue #123')) | |||
ce62632e15f5 | ->addExample( | ||
7a39ac43b48c | array('/[Ii]ssues?:?(\s*,?\s*#\d+)+/', '/(\d+)/'), | ||
ce62632e15f5 | pht('Issue #123, #456')) | ||
7a39ac43b48c | ->addExample(array('/(?<!#)\b(T[1-9]\d*)\b/'), pht('Task T123')) | ||
7d26252a3f3e | ->addExample('/[A-Z]{2,}-\d+/', pht('JIRA-1234')) | ||
36e2d02d6ec5 | ->setDescription( | ||
pht( | |||
'Regular expression to link external bug tracker. See '. | |||
6a5807eba44f | 'http://tortoisesvn.net/docs/release/TortoiseSVN_en/'. | ||
'tsvn-dug-bugtracker.html for further explanation.')), | |||
0278b15ceb5d | $this->newOption('diffusion.allow-http-auth', 'bool', false) | ||
->setBoolOptions( | |||
array( | |||
pht('Allow HTTP Basic Auth'), | |||
pht('Disable HTTP Basic Auth'), | |||
)) | |||
->setSummary(pht('Enable HTTP Basic Auth for repositories.')) | |||
->setDescription( | |||
pht( | |||
"Phabricator can serve repositories over HTTP, using HTTP basic ". | |||
"auth.\n\n". | |||
"Because HTTP basic auth is less secure than SSH auth, it is ". | |||
"disabled by default. You can enable it here if you'd like to use ". | |||
"it anyway. There's nothing fundamentally insecure about it as ". | |||
"long as Phabricator uses HTTPS, but it presents a much lower ". | |||
"barrier to attackers than SSH does.\n\n". | |||
"Consider using SSH for authenticated access to repositories ". | |||
a0e820ad9a2e | "instead of HTTP.")), | ||
$this->newOption('diffusion.ssh-user', 'string', null) | |||
02b174c2af04 | ->setLocked(true) | ||
a0e820ad9a2e | ->setSummary(pht('Login username for SSH connections to repositories.')) | ||
->setDescription( | |||
pht( | |||
'When constructing clone URIs to show to users, Diffusion will '. | |||
'fill in this login username. If you have configured a VCS user '. | |||
'like `git`, you should provide it here.')), | |||
c3d9c2838228 | $this->newOption('diffusion.ssh-port', 'int', null) | ||
02b174c2af04 | ->setLocked(true) | ||
c3d9c2838228 | ->setSummary(pht('Port for SSH connections to repositories.')) | ||
->setDescription( | |||
pht( | |||
'When constructing clone URIs to show to users, Diffusion by '. | |||
'default will not display a port assuming the default for your '. | |||
'VCS. Explicitly declare when running on a non-standard port.')), | |||
02b174c2af04 | $this->newOption('diffusion.ssh-host', 'string', null) | ||
->setLocked(true) | |||
->setSummary(pht('Host for SSH connections to repositories.')) | |||
->setDescription( | |||
pht( | |||
'If you accept Phabricator SSH traffic on a different host '. | |||
'from web traffic (for example, if you use different SSH and '. | |||
'web load balancers), you can set the SSH hostname here. This '. | |||
'is an advanced option.')), | |||
b04a6a199951 | ); | ||
} | |||
} |
Owner Packages
Owner Packages
- No Owners