Show GitHub API error
This commit is contained in:
parent
82402aca98
commit
e230d7ab2b
1 changed files with 10 additions and 6 deletions
|
@ -83,6 +83,7 @@ if ($options) {
|
|||
use Github\Client;
|
||||
|
||||
if ($options) {
|
||||
try {
|
||||
$client = new Client();
|
||||
$release = $client->api('repo')->releases()->latest('grandeljay', 'wishthis');
|
||||
$tag = $release['tag_name'];
|
||||
|
@ -91,6 +92,9 @@ if ($options) {
|
|||
if (-1 === version_compare($options->version, $version)) {
|
||||
$options->updateAvailable = true;
|
||||
}
|
||||
} catch (\Github\Exception\RuntimeException $th) {
|
||||
echo $th->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue