mirror of
https://github.com/avency/Gitea.git
synced 2025-10-29 18:52:33 +01:00
Merge branch 'feature/mg-issuesEndpoint' of AVENCY/Gitea into master
Reviewed-by: Lisa Kampert <lisa.kampert@avency.de>
This commit is contained in:
@ -6,6 +6,7 @@ namespace Avency\Gitea;
|
|||||||
|
|
||||||
use Avency\Gitea\Endpoint\Admin;
|
use Avency\Gitea\Endpoint\Admin;
|
||||||
use Avency\Gitea\Endpoint\EndpointInterface;
|
use Avency\Gitea\Endpoint\EndpointInterface;
|
||||||
|
use Avency\Gitea\Endpoint\Issues;
|
||||||
use Avency\Gitea\Endpoint\Miscellaneous;
|
use Avency\Gitea\Endpoint\Miscellaneous;
|
||||||
use Avency\Gitea\Endpoint\Organizations;
|
use Avency\Gitea\Endpoint\Organizations;
|
||||||
use Avency\Gitea\Endpoint\Repositories;
|
use Avency\Gitea\Endpoint\Repositories;
|
||||||
@ -18,6 +19,7 @@ use Psr\Http\Message\ResponseInterface;
|
|||||||
* Gitea Client
|
* Gitea Client
|
||||||
*
|
*
|
||||||
* @method Admin admin()
|
* @method Admin admin()
|
||||||
|
* @method Issues issues()
|
||||||
* @method Miscellaneous miscellaneous()
|
* @method Miscellaneous miscellaneous()
|
||||||
* @method Organizations organizations()
|
* @method Organizations organizations()
|
||||||
* @method Repositories repositories()
|
* @method Repositories repositories()
|
||||||
|
|||||||
47
Classes/Endpoint/Issues.php
Normal file
47
Classes/Endpoint/Issues.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Avency\Gitea\Endpoint;
|
||||||
|
|
||||||
|
use Avency\Gitea\Client;
|
||||||
|
use Avency\Gitea\Endpoint\Issues\CommentsTrait;
|
||||||
|
use Avency\Gitea\Endpoint\Issues\IssuesTrait;
|
||||||
|
use Avency\Gitea\Endpoint\Issues\IssueTrait;
|
||||||
|
use Avency\Gitea\Endpoint\Issues\LabelsTrait;
|
||||||
|
use Avency\Gitea\Endpoint\Issues\MilestonesTrait;
|
||||||
|
use Avency\Gitea\Endpoint\Issues\ReactionsTrait;
|
||||||
|
use Avency\Gitea\Endpoint\Issues\StopwatchTrait;
|
||||||
|
use Avency\Gitea\Endpoint\Issues\SubscriptionsTrait;
|
||||||
|
use Avency\Gitea\Endpoint\Issues\TimesTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issues endpoint
|
||||||
|
*/
|
||||||
|
class Issues extends AbstractEndpoint implements EndpointInterface
|
||||||
|
{
|
||||||
|
use CommentsTrait;
|
||||||
|
use IssueTrait;
|
||||||
|
use IssuesTrait;
|
||||||
|
use LabelsTrait;
|
||||||
|
use MilestonesTrait;
|
||||||
|
use ReactionsTrait;
|
||||||
|
use StopwatchTrait;
|
||||||
|
use SubscriptionsTrait;
|
||||||
|
use TimesTrait;
|
||||||
|
|
||||||
|
const BASE_URI = '/repos';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Client
|
||||||
|
*/
|
||||||
|
protected $client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Client $client
|
||||||
|
*/
|
||||||
|
public function __construct(Client $client)
|
||||||
|
{
|
||||||
|
$this->client = $client;
|
||||||
|
}
|
||||||
|
}
|
||||||
140
Classes/Endpoint/Issues/CommentsTrait.php
Normal file
140
Classes/Endpoint/Issues/CommentsTrait.php
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Avency\Gitea\Endpoint\Issues;
|
||||||
|
|
||||||
|
use Avency\Gitea\Client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issues Comments Trait
|
||||||
|
*/
|
||||||
|
trait CommentsTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getComments(string $owner, string $repositoryName): array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/comments');
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $id
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function deleteComment(string $owner, string $repositoryName, int $id): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/comments/' . $id, 'DELETE');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $id
|
||||||
|
* @param string $body
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function updateComment(string $owner, string $repositoryName, int $id, string $body): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'body' => $body
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/comments/' . $id, 'PATCH', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $id
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getCommentReactions(string $owner, string $repositoryName, int $id): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'body' => $body
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/comments/' . $id . '/reactions');
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $id
|
||||||
|
* @param string $reaction
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function addCommentReaction(string $owner, string $repositoryName, int $id, string $reaction): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'content' => $reaction
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/comments/' . $id . '/reactions', 'POST', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $id
|
||||||
|
* @param string $reaction
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function deleteCommentReaction(string $owner, string $repositoryName, int $id, string $reaction): bool
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'content' => $reaction
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/comments/' . $id . '/reactions', 'DELETE', $options);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getIssueComments(string $owner, string $repositoryName, int $index): array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/comments');
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param string $body
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function addIssueComment(string $owner, string $repositoryName, int $index, string $body): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'body' => $body
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/comments', 'POST', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
101
Classes/Endpoint/Issues/IssueTrait.php
Normal file
101
Classes/Endpoint/Issues/IssueTrait.php
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Avency\Gitea\Endpoint\Issues;
|
||||||
|
|
||||||
|
use Avency\Gitea\Client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issues Issue Trait
|
||||||
|
*/
|
||||||
|
trait IssueTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function get(string $owner, string $repositoryName, int $index): array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param string|null $assignee
|
||||||
|
* @param array|null $assignees
|
||||||
|
* @param string|null $body
|
||||||
|
* @param \DateTime|null $dueDate
|
||||||
|
* @param int|null $milestone
|
||||||
|
* @param string|null $state
|
||||||
|
* @param string|null $title
|
||||||
|
* @param bool|null $unsetDueDate
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function update(
|
||||||
|
string $owner,
|
||||||
|
string $repositoryName,
|
||||||
|
int $index,
|
||||||
|
string $assignee = null,
|
||||||
|
array $assignees = null,
|
||||||
|
string $body = null,
|
||||||
|
\DateTime $dueDate = null,
|
||||||
|
int $milestone = null,
|
||||||
|
string $state = null,
|
||||||
|
string $title = null,
|
||||||
|
bool $unsetDueDate = null
|
||||||
|
): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'assignee' => $assignee,
|
||||||
|
'assignees' => $assignees,
|
||||||
|
'body' => $body,
|
||||||
|
'due_date' => $dueDate ? $dueDate->format(\DateTime::ATOM) : null,
|
||||||
|
'mileston' => $milestone,
|
||||||
|
'state' => $state,
|
||||||
|
'title' => $title,
|
||||||
|
'unset_due_date' => $unsetDueDate,
|
||||||
|
];
|
||||||
|
$options['json'] = $this->removeNullValues($options['json']);
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index, 'PATCH', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param string|null $assignee
|
||||||
|
* @param array|null $assignees
|
||||||
|
* @param string|null $body
|
||||||
|
* @param \DateTime|null $dueDate
|
||||||
|
* @param int|null $milestone
|
||||||
|
* @param string|null $state
|
||||||
|
* @param string|null $title
|
||||||
|
* @param bool|null $unsetDueDate
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function setDeadline(
|
||||||
|
string $owner,
|
||||||
|
string $repositoryName,
|
||||||
|
int $index,
|
||||||
|
\DateTime $dueDate
|
||||||
|
): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'due_date' => $dueDate->format(\DateTime::ATOM),
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/deadline', 'POST', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
98
Classes/Endpoint/Issues/IssuesTrait.php
Normal file
98
Classes/Endpoint/Issues/IssuesTrait.php
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Avency\Gitea\Endpoint\Issues;
|
||||||
|
|
||||||
|
use Avency\Gitea\Client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issues Issues Trait
|
||||||
|
*/
|
||||||
|
trait IssuesTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param string|null $searchTerm
|
||||||
|
* @param string|null $state
|
||||||
|
* @param string|null $labels
|
||||||
|
* @param int|null $page
|
||||||
|
* @param int|null $priorityRepoId
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function search(
|
||||||
|
string $searchTerm = null,
|
||||||
|
string $state = null,
|
||||||
|
string $labels = null,
|
||||||
|
int $page = null,
|
||||||
|
int $priorityRepoId = null
|
||||||
|
): array
|
||||||
|
{
|
||||||
|
$options['query'] = [
|
||||||
|
'q' => $searchTerm,
|
||||||
|
'state' => $state,
|
||||||
|
'labels' => $labels,
|
||||||
|
'page' => $page,
|
||||||
|
'priority_repo_id' => $priorityRepoId,
|
||||||
|
];
|
||||||
|
$options['query'] = $this->removeNullValues($options['query']);
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/issues/search', 'GET', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getIssues(string $owner, string $repositoryName): array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues');
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param string $title
|
||||||
|
* @param string|null $assignee
|
||||||
|
* @param array|null $assignees
|
||||||
|
* @param string|null $body
|
||||||
|
* @param bool|null $closed
|
||||||
|
* @param \Datetime|null $dueDate
|
||||||
|
* @param array|null $labels
|
||||||
|
* @param int|null $milestone
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function create(
|
||||||
|
string $owner,
|
||||||
|
string $repositoryName,
|
||||||
|
string $title,
|
||||||
|
string $assignee = null,
|
||||||
|
array $assignees = null,
|
||||||
|
string $body = null,
|
||||||
|
bool $closed = null,
|
||||||
|
\Datetime $dueDate = null,
|
||||||
|
array $labels = null,
|
||||||
|
int $milestone = null
|
||||||
|
): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'title' => $title,
|
||||||
|
'assignee' => $assignee,
|
||||||
|
'assignees' => $assignees,
|
||||||
|
'body' => $body,
|
||||||
|
'closed' => $closed,
|
||||||
|
'due_date' => $dueDate ? $dueDate->format(\DateTime::ATOM) : null,
|
||||||
|
'labels' => $labels,
|
||||||
|
'milestone' => $milestone,
|
||||||
|
];
|
||||||
|
$options['json'] = $this->removeNullValues($options['json']);
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues', 'POST', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
154
Classes/Endpoint/Issues/LabelsTrait.php
Normal file
154
Classes/Endpoint/Issues/LabelsTrait.php
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Avency\Gitea\Endpoint\Issues;
|
||||||
|
|
||||||
|
use Avency\Gitea\Client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issues Labels Trait
|
||||||
|
*/
|
||||||
|
trait LabelsTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getLabels(string $owner, string $repositoryName, int $index): array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/labels');
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param array $labels
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function replaceLabels(string $owner, string $repositoryName, int $index, array $labels): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'labels' => $labels
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/labels', 'PUT', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param array $labels
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function addLabels(string $owner, string $repositoryName, int $index, array $labels): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'labels' => $labels
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/labels', 'POST', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function deleteAllLabels(string $owner, string $repositoryName, int $index): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/labels', 'DELETE');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param int $id
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function deleteLabel(string $owner, string $repositoryName, int $index, int $id): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/labels/' . $id, 'DELETE');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getRepositoryLabels(string $owner, string $repositoryName): array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/labels');
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $id
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getRepositoryLabel(string $owner, string $repositoryName, int $id): array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/labels/' . $id);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $id
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function updateRepositoryLabel(
|
||||||
|
string $owner,
|
||||||
|
string $repositoryName,
|
||||||
|
int $id,
|
||||||
|
string $name = null,
|
||||||
|
string $description = null,
|
||||||
|
string $color = null
|
||||||
|
): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'name' => $name,
|
||||||
|
'description' => $description,
|
||||||
|
'color' => $color,
|
||||||
|
];
|
||||||
|
$options['json'] = $this->removeNullValues($options['json']);
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/labels/' . $id, 'PATCH', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $id
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function deleteRepositoryLabel(string $owner, string $repositoryName, int $id): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/labels/' . $id, 'DELETE');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
112
Classes/Endpoint/Issues/MilestonesTrait.php
Normal file
112
Classes/Endpoint/Issues/MilestonesTrait.php
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Avency\Gitea\Endpoint\Issues;
|
||||||
|
|
||||||
|
use Avency\Gitea\Client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issues Milestones Trait
|
||||||
|
*/
|
||||||
|
trait MilestonesTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getMilestones(string $owner, string $repositoryName): array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/milestones');
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param string $title
|
||||||
|
* @param string|null $description
|
||||||
|
* @param \DateTime|null $dueDate
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function addMilestone(
|
||||||
|
string $owner,
|
||||||
|
string $repositoryName,
|
||||||
|
string $title,
|
||||||
|
string $description = null,
|
||||||
|
\DateTime $dueDate = null
|
||||||
|
): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'title' => $title,
|
||||||
|
'description' => $description,
|
||||||
|
'due_date' => $dueDate ? $dueDate->format(\DateTime::ATOM) : null,
|
||||||
|
];
|
||||||
|
$options['json'] = $this->removeNullValues($options['json']);
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/milestones', 'POST', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $id
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getMilestone(string $owner, string $repositoryName, int $id): array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/milestones/' . $id);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $id
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function deleteMilestone(string $owner, string $repositoryName, int $id): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/milestones/' . $id, 'DELETE');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $id
|
||||||
|
* @param string|null $title
|
||||||
|
* @param string|null $description
|
||||||
|
* @param \DateTime|null $dueDate
|
||||||
|
* @param string|null $state
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function updateMilestone(
|
||||||
|
string $owner,
|
||||||
|
string $repositoryName,
|
||||||
|
int $id,
|
||||||
|
string $title = null,
|
||||||
|
string $description = null,
|
||||||
|
\DateTime $dueDate = null,
|
||||||
|
string $state = null
|
||||||
|
): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'title' => $title,
|
||||||
|
'description' => $description,
|
||||||
|
'due_date' => $dueDate ? $dueDate->format(\DateTime::ATOM) : null,
|
||||||
|
'state' => $state,
|
||||||
|
];
|
||||||
|
$options['json'] = $this->removeNullValues($options['json']);
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/milestones/' . $id, 'PATCH', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
62
Classes/Endpoint/Issues/ReactionsTrait.php
Normal file
62
Classes/Endpoint/Issues/ReactionsTrait.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Avency\Gitea\Endpoint\Issues;
|
||||||
|
|
||||||
|
use Avency\Gitea\Client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issues Reactions Trait
|
||||||
|
*/
|
||||||
|
trait ReactionsTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @return array|null
|
||||||
|
*/
|
||||||
|
public function getReactions(string $owner, string $repositoryName, int $index): ?array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/reactions');
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param string $reaction
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function deleteReaction(string $owner, string $repositoryName, int $index, string $reaction): bool
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'content' => $reaction
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/reactions', 'DELETE', $options);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param string $reaction
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function addReaction(string $owner, string $repositoryName, int $index, string $reaction): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'content' => $reaction
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/reactions', 'POST', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
52
Classes/Endpoint/Issues/StopwatchTrait.php
Normal file
52
Classes/Endpoint/Issues/StopwatchTrait.php
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Avency\Gitea\Endpoint\Issues;
|
||||||
|
|
||||||
|
use Avency\Gitea\Client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issues Stopwatch Trait
|
||||||
|
*/
|
||||||
|
trait StopwatchTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function startStopwatch(string $owner, string $repositoryName, int $index): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/stopwatch/start', 'POST');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function stopStopwatch(string $owner, string $repositoryName, int $index): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/stopwatch/stop', 'POST');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function deleteStopwatch(string $owner, string $repositoryName, int $index): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/stopwatch/delete', 'DELETE');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
54
Classes/Endpoint/Issues/SubscriptionsTrait.php
Normal file
54
Classes/Endpoint/Issues/SubscriptionsTrait.php
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Avency\Gitea\Endpoint\Issues;
|
||||||
|
|
||||||
|
use Avency\Gitea\Client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issues Subscriptions Trait
|
||||||
|
*/
|
||||||
|
trait SubscriptionsTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @return array|null
|
||||||
|
*/
|
||||||
|
public function getSubscriptions(string $owner, string $repositoryName, int $index): ?array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/subscriptions');
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param string $username
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function deleteSubscription(string $owner, string $repositoryName, int $index, string $username): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/subscriptions/' . $username, 'DELETE');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param string $username
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function addSubscription(string $owner, string $repositoryName, int $index, string $username): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/subscriptions/' . $username, 'PUT');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
83
Classes/Endpoint/Issues/TimesTrait.php
Normal file
83
Classes/Endpoint/Issues/TimesTrait.php
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Avency\Gitea\Endpoint\Issues;
|
||||||
|
|
||||||
|
use Avency\Gitea\Client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issues Times Trait
|
||||||
|
*/
|
||||||
|
trait TimesTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @return array|null
|
||||||
|
*/
|
||||||
|
public function getTimes(string $owner, string $repositoryName, int $index): ?array
|
||||||
|
{
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/times');
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function deleteAllTimes(string $owner, string $repositoryName, int $index): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/times', 'DELETE');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param int $id
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function deleteTime(string $owner, string $repositoryName, int $index, int $id): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/times/' . $id, 'DELETE');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @param int $index
|
||||||
|
* @param int $time
|
||||||
|
* @param string|null $username
|
||||||
|
* @param \DateTime|null $createdDate
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function addTime(
|
||||||
|
string $owner,
|
||||||
|
string $repositoryName,
|
||||||
|
int $index,
|
||||||
|
int $time,
|
||||||
|
string $username = null,
|
||||||
|
\DateTime $createdDate = null
|
||||||
|
): array
|
||||||
|
{
|
||||||
|
$options['json'] = [
|
||||||
|
'time' => $time,
|
||||||
|
'user_name' => $username,
|
||||||
|
'created' => $createdDate ? $createdDate->format(\DateTime::ATOM) : null,
|
||||||
|
];
|
||||||
|
$options['json'] = $this->removeNullValues($options['json']);
|
||||||
|
|
||||||
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/issues/' . $index . '/times', 'POST', $options);
|
||||||
|
|
||||||
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
88
README.md
88
README.md
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
This package provides an API client for [Gitea](https://gitea.io) API Version 1.
|
This package provides an API client for [Gitea](https://gitea.io) API Version 1.
|
||||||
|
|
||||||
*Caution! This package is still under development*
|
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
@ -149,48 +147,50 @@ Status | Method | Endpoint | Comment
|
|||||||
|
|
||||||
Status | Method | Endpoint | Comment
|
Status | Method | Endpoint | Comment
|
||||||
--- | --- | --- | ---
|
--- | --- | --- | ---
|
||||||
❌ | GET | /repos/issues/search |
|
✅ | GET | /repos/issues/search |
|
||||||
❌ | GET | /repos/{owner}/{repo}/issues |
|
✅ | GET | /repos/{owner}/{repo}/issues |
|
||||||
❌ | POST | /repos/{owner}/{repo}/issues |
|
✅ | POST | /repos/{owner}/{repo}/issues |
|
||||||
❌ | GET | /repos/{owner}/{repo}/issues/comments |
|
✅ | GET | /repos/{owner}/{repo}/issues/comments |
|
||||||
❌ | DELETE | /repos/{owner}/{repo}/issues/comments/{id} |
|
✅ | DELETE | /repos/{owner}/{repo}/issues/comments/{id} |
|
||||||
❌ | PATCH | /repos/{owner}/{repo}/issues/comments/{id} |
|
✅ | PATCH | /repos/{owner}/{repo}/issues/comments/{id} |
|
||||||
❌ | GET | /repos/{owner}/{repo}/issues/comments/{id}/reactions |
|
✅ | GET | /repos/{owner}/{repo}/issues/comments/{id}/reactions |
|
||||||
❌ | POST | /repos/{owner}/{repo}/issues/comments/{id}/reactions |
|
✅ | POST | /repos/{owner}/{repo}/issues/comments/{id}/reactions |
|
||||||
❌ | DELETE | /repos/{owner}/{repo}/issues/comments/{id}/reactions |
|
✅ | DELETE | /repos/{owner}/{repo}/issues/comments/{id}/reactions |
|
||||||
❌ | GET | /repos/{owner}/{repo}/issues/{index} |
|
✅ | GET | /repos/{owner}/{repo}/issues/{index} |
|
||||||
❌ | PATCH | /repos/{owner}/{repo}/issues/{index} |
|
✅ | PATCH | /repos/{owner}/{repo}/issues/{index} |
|
||||||
❌ | GET | /repos/{owner}/{repo}/issues/{index}/comments |
|
✅ | GET | /repos/{owner}/{repo}/issues/{index}/comments |
|
||||||
❌ | POST | /repos/{owner}/{repo}/issues/{index}/comments |
|
✅ | POST | /repos/{owner}/{repo}/issues/{index}/comments |
|
||||||
❌ | POST | /repos/{owner}/{repo}/issues/{index}/deadline |
|
⛔️ | DELETE | /repos/{owner}/{repo}/issues/{index}/comments/{id} | Not supported / Deprecated
|
||||||
❌ | GET | /repos/{owner}/{repo}/issues/{index}/labels |
|
⛔️ | PATCH | /repos/{owner}/{repo}/issues/{index}/comments/{id} | Not supported / Deprecated
|
||||||
❌ | PUT | /repos/{owner}/{repo}/issues/{index}/labels |
|
✅ | POST | /repos/{owner}/{repo}/issues/{index}/deadline |
|
||||||
❌ | POST | /repos/{owner}/{repo}/issues/{index}/labels |
|
✅ | GET | /repos/{owner}/{repo}/issues/{index}/labels |
|
||||||
❌ | DELETE | /repos/{owner}/{repo}/issues/{index}/labels |
|
✅ | PUT | /repos/{owner}/{repo}/issues/{index}/labels |
|
||||||
❌ | DELETE | /repos/{owner}/{repo}/issues/{index}/labels/{id} |
|
✅ | POST | /repos/{owner}/{repo}/issues/{index}/labels |
|
||||||
❌ | GET | /repos/{owner}/{repo}/issues/{index}/reactions |
|
✅ | DELETE | /repos/{owner}/{repo}/issues/{index}/labels |
|
||||||
❌ | POST | /repos/{owner}/{repo}/issues/{index}/reactions |
|
✅ | DELETE | /repos/{owner}/{repo}/issues/{index}/labels/{id} |
|
||||||
❌ | DELETE | /repos/{owner}/{repo}/issues/{index}/reactions |
|
✅ | GET | /repos/{owner}/{repo}/issues/{index}/reactions |
|
||||||
❌ | DELETE | /repos/{owner}/{repo}/issues/{index}/stopwatch/delete |
|
✅ | POST | /repos/{owner}/{repo}/issues/{index}/reactions |
|
||||||
❌ | POST | /repos/{owner}/{repo}/issues/{index}/stopwatch/start |
|
✅ | DELETE | /repos/{owner}/{repo}/issues/{index}/reactions |
|
||||||
❌ | POST | /repos/{owner}/{repo}/issues/{index}/stopwatch/stop |
|
✅ | DELETE | /repos/{owner}/{repo}/issues/{index}/stopwatch/delete |
|
||||||
❌ | GET | /repos/{owner}/{repo}/issues/{index}/subscriptions |
|
✅ | POST | /repos/{owner}/{repo}/issues/{index}/stopwatch/start |
|
||||||
❌ | PUT | /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} |
|
✅ | POST | /repos/{owner}/{repo}/issues/{index}/stopwatch/stop |
|
||||||
❌ | DELETE | /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} |
|
✅ | GET | /repos/{owner}/{repo}/issues/{index}/subscriptions |
|
||||||
❌ | GET | /repos/{owner}/{repo}/issues/{index}/times |
|
✅ | PUT | /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} |
|
||||||
❌ | POST | /repos/{owner}/{repo}/issues/{index}/times |
|
✅ | DELETE | /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} |
|
||||||
❌ | DELETE | /repos/{owner}/{repo}/issues/{index}/times |
|
✅ | GET | /repos/{owner}/{repo}/issues/{index}/times |
|
||||||
❌ | DELETE | /repos/{owner}/{repo}/issues/{index}/times/{id} |
|
✅ | POST | /repos/{owner}/{repo}/issues/{index}/times |
|
||||||
❌ | GET | /repos/{owner}/{repo}/labels |
|
✅ | DELETE | /repos/{owner}/{repo}/issues/{index}/times |
|
||||||
❌ | POST | /repos/{owner}/{repo}/labels |
|
✅ | DELETE | /repos/{owner}/{repo}/issues/{index}/times/{id} |
|
||||||
❌ | GET | /repos/{owner}/{repo}/labels/{id} |
|
✅ | GET | /repos/{owner}/{repo}/labels |
|
||||||
❌ | DELETE | /repos/{owner}/{repo}/labels/{id} |
|
✅ | POST | /repos/{owner}/{repo}/labels |
|
||||||
❌ | PATCH | /repos/{owner}/{repo}/labels/{id} |
|
✅ | GET | /repos/{owner}/{repo}/labels/{id} |
|
||||||
❌ | GET | /repos/{owner}/{repo}/milestones |
|
✅ | DELETE | /repos/{owner}/{repo}/labels/{id} |
|
||||||
❌ | POST | /repos/{owner}/{repo}/milestones |
|
✅ | PATCH | /repos/{owner}/{repo}/labels/{id} |
|
||||||
❌ | GET | /repos/{owner}/{repo}/milestones/{id} |
|
✅ | GET | /repos/{owner}/{repo}/milestones |
|
||||||
❌ | DELETE | /repos/{owner}/{repo}/milestones/{id} |
|
✅ | POST | /repos/{owner}/{repo}/milestones |
|
||||||
❌ | PATCH | /repos/{owner}/{repo}/milestones/{id} |
|
✅ | GET | /repos/{owner}/{repo}/milestones/{id} |
|
||||||
|
✅ | DELETE | /repos/{owner}/{repo}/milestones/{id} |
|
||||||
|
✅ | PATCH | /repos/{owner}/{repo}/milestones/{id} |
|
||||||
|
|
||||||
#### Repository
|
#### Repository
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user