Composer API
Class

Composer\Util\GitHub

class GitHub

Methods

__construct(IOInterface $io, Config $config, ProcessExecutor $process = null, RemoteFilesystem $remoteFilesystem = null)

Constructor.

bool authorizeOAuth(string $originUrl)

Attempts to authorize a GitHub domain via OAuth

bool authorizeOAuthInteractively(string $originUrl, string $message = null)

Authorizes a GitHub domain interactively via OAuth

Details

at line 38
public __construct(IOInterface $io, Config $config, ProcessExecutor $process = null, RemoteFilesystem $remoteFilesystem = null)

Constructor.

Parameters

IOInterface $io The IO instance
Config $config The composer configuration
ProcessExecutor $process Process instance, injectable for mocking
RemoteFilesystem $remoteFilesystem Remote Filesystem, injectable for mocking

at line 52
public bool authorizeOAuth(string $originUrl)

Attempts to authorize a GitHub domain via OAuth

Parameters

string $originUrl The host this GitHub instance is located at

Return Value

bool true on success

at line 77
public bool authorizeOAuthInteractively(string $originUrl, string $message = null)

Authorizes a GitHub domain interactively via OAuth

Parameters

string $originUrl The host this GitHub instance is located at
string $message The reason this authorization is required

Return Value

bool true on success

Exceptions

RuntimeException
Exception