Add /repos/:owner/:repo/mirror-sync (#54)

This commit is contained in:
Jonas Östanbäck 2017-05-02 17:01:11 +02:00 committed by Lunny Xiao
parent d2f87fd3f9
commit e1c76d42f2
1 changed files with 6 additions and 0 deletions

View File

@ -156,3 +156,9 @@ func (c *Client) MigrateRepo(opt MigrateRepoOption) (*Repository, error) {
repo := new(Repository)
return repo, c.getParsedResponse("POST", "/repos/migrate", jsonHeader, bytes.NewReader(body), repo)
}
// MirrorSync adds a mirrored repository to the mirror sync queue.
func (c *Client) MirrorSync(owner, repo string) error {
_, err := c.getResponse("POST", fmt.Sprintf("/repos/%s/%s/mirror-sync", owner, repo), nil, nil)
return err
}