public function __construct(array $config, Config $globalConfig)
{
if (!isset($config['base_url'], $config['repo_domain_url'])) {
throw new UserException('Your GitHub adapter configuration is invalid. Please run "core:configure".');
}
if (!isset($config['authentication']['token'])) {
throw new UserException(['Your GitHub adapter configuration seems to be outdated.', 'For better security Gush will now always generate an personal access-token ' . 'instead of storing your password.', 'Please run "core:configure" to update your configuration, then remove any old ' . 'access tokens (starting with "Gush") from your account.']);
}
$this->config = $config;
$this->globalConfig = $globalConfig;
$this->client = $this->buildGitHubClient();
}