for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace XoopsModules\Wggithub\Github;
/*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* @copyright XOOPS Project https://xoops.org/
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @since
* @author Goffy - XOOPS Development Team
* Class Releases
class Releases extends GitHub
{
* Get all releases
* @param $user
* @param $repository
* @return array
public function getReleases($user, $repository)
$url = static::BASE_URL . 'repos/' . $user . '/' . $repository . '/releases';
return $this->_get($url);
return $this->_get($url)
boolean
array
}
* Get latest release
* @param bool $prerelease
public function getLatestRelease($user, $repository, $prerelease = false)
if ($prerelease) {
} else {
$url = static::BASE_URL . 'repos/' . $user . '/' . $repository . '/releases/latest';
$result = $this->_get($url);
if (\is_array($result)) {
return $result[0];
return [];
return $result;
return $result