@ -26,9 +26,11 @@ type Repository struct {
Name string ` json:"name" `
Name string ` json:"name" `
FullName string ` json:"full_name" `
FullName string ` json:"full_name" `
Description string ` json:"description" `
Description string ` json:"description" `
Empty bool ` json:"empty" `
Private bool ` json:"private" `
Private bool ` json:"private" `
Fork bool ` json:"fork" `
Fork bool ` json:"fork" `
Mirror bool ` json:"mirror" `
Mirror bool ` json:"mirror" `
Size int ` json:"size" `
HTMLURL string ` json:"html_url" `
HTMLURL string ` json:"html_url" `
SSHURL string ` json:"ssh_url" `
SSHURL string ` json:"ssh_url" `
CloneURL string ` json:"clone_url" `
CloneURL string ` json:"clone_url" `
@ -156,3 +158,9 @@ func (c *Client) MigrateRepo(opt MigrateRepoOption) (*Repository, error) {
repo := new ( Repository )
repo := new ( Repository )
return repo , c . getParsedResponse ( "POST" , "/repos/migrate" , jsonHeader , bytes . NewReader ( body ) , repo )
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
}