summaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/sdk/gitea/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/repo.go')
-rw-r--r--vendor/code.gitea.io/sdk/gitea/repo.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/repo.go b/vendor/code.gitea.io/sdk/gitea/repo.go
index acacb0ec44..b2447618f6 100644
--- a/vendor/code.gitea.io/sdk/gitea/repo.go
+++ b/vendor/code.gitea.io/sdk/gitea/repo.go
@@ -26,9 +26,11 @@ type Repository struct {
Name string `json:"name"`
FullName string `json:"full_name"`
Description string `json:"description"`
+ Empty bool `json:"empty"`
Private bool `json:"private"`
Fork bool `json:"fork"`
Mirror bool `json:"mirror"`
+ Size int `json:"size"`
HTMLURL string `json:"html_url"`
SSHURL string `json:"ssh_url"`
CloneURL string `json:"clone_url"`
@@ -156,3 +158,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
+}