mirror of
https://github.com/avency/Gitea.git
synced 2025-10-29 18:52:33 +01:00
feat: Add repo mirror-sync endpoint
This commit is contained in:
@ -236,4 +236,16 @@ trait RepositoryTrait
|
|||||||
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName, 'PATCH', $options);
|
$response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName, 'PATCH', $options);
|
||||||
return \GuzzleHttp\json_decode($response->getBody(), true);
|
return \GuzzleHttp\json_decode($response->getBody(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $owner
|
||||||
|
* @param string $repositoryName
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function mirrorSync(string $owner, string $repositoryName): bool
|
||||||
|
{
|
||||||
|
$this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/mirror-sync', 'POST');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user