Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Commit e1c76d4

Browse files
cez81lunny
authored andcommitted
Add /repos/:owner/:repo/mirror-sync (#54)
1 parent d2f87fd commit e1c76d4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gitea/repo.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,9 @@ func (c *Client) MigrateRepo(opt MigrateRepoOption) (*Repository, error) {
156156
repo := new(Repository)
157157
return repo, c.getParsedResponse("POST", "/repos/migrate", jsonHeader, bytes.NewReader(body), repo)
158158
}
159+
160+
// MirrorSync adds a mirrored repository to the mirror sync queue.
161+
func (c *Client) MirrorSync(owner, repo string) error {
162+
_, err := c.getResponse("POST", fmt.Sprintf("/repos/%s/%s/mirror-sync", owner, repo), nil, nil)
163+
return err
164+
}

0 commit comments

Comments
 (0)