gitea/src/f6249c33-b4bd-4598-8710-0ca.../code.power

22 lines
471 B
Plaintext

/**
* Sync a mirrored repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
*
* @return string
* @since 3.2.0
*/
public function sync(string $owner, string $repo): string
{
// Build the request path.
$path = "/repos/{$owner}/{$repo}/mirror-sync";
// Send the POST request.
return $this->response->get(
$this->http->post(
$this->uri->get($path)
), 200, 'success'
);
}