1
0
Fork 0

Merge pull request #3164 from xelan/github-expose-hostname-setting

Option to disable inclusion of hostname in OAuth app name
pull/3365/head
Jordi Boggiano 2014-10-17 17:16:30 +01:00
commit e4d96750ee
2 changed files with 4 additions and 1 deletions

View File

@ -39,6 +39,7 @@ class Config
'optimize-autoloader' => false,
'prepend-autoloader' => true,
'github-domains' => array('github.com'),
'github-expose-hostname' => true,
'store-auths' => 'prompt',
// valid keys without defaults (auth config stuff):
// github-oauth

View File

@ -97,8 +97,10 @@ class GitHub
// build up OAuth app name
$appName = 'Composer';
if (0 === $this->process->execute('hostname', $output)) {
if ($this->config->get('github-expose-hostname') === true && 0 === $this->process->execute('hostname', $output)) {
$appName .= ' on ' . trim($output);
} else {
$appName .= ' [' . date('YmdHis') . ']';
}
$headers = array();