From 176850495ec240b1cd54d5f03486652d0a663786 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Thu, 3 Aug 2023 02:39:37 +0200 Subject: [PATCH] Fix woodpecker-go (#2090) Closes #2083 This is breaking because I removed the old, unused `sync` parameter (#2083). --- cli/repo/repo_sync.go | 2 +- woodpecker-go/woodpecker/client.go | 4 ++-- woodpecker-go/woodpecker/interface.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/repo/repo_sync.go b/cli/repo/repo_sync.go index 846230ce36..c90f840c21 100644 --- a/cli/repo/repo_sync.go +++ b/cli/repo/repo_sync.go @@ -27,7 +27,7 @@ func repoSync(c *cli.Context) error { return err } - repos, err := client.RepoListOpts(true, true) + repos, err := client.RepoListOpts(true) if err != nil || len(repos) == 0 { return err } diff --git a/woodpecker-go/woodpecker/client.go b/woodpecker-go/woodpecker/client.go index b06e3aa570..051f613a8f 100644 --- a/woodpecker-go/woodpecker/client.go +++ b/woodpecker-go/woodpecker/client.go @@ -165,9 +165,9 @@ func (c *client) RepoList() ([]*Repo, error) { // RepoListOpts returns a list of all repositories to which // the user has explicit access in the host system. -func (c *client) RepoListOpts(sync, all bool) ([]*Repo, error) { +func (c *client) RepoListOpts(all bool) ([]*Repo, error) { var out []*Repo - uri := fmt.Sprintf(pathRepos+"?flush=%v&all=%v", c.addr, sync, all) + uri := fmt.Sprintf(pathRepos+"?all=%v", c.addr, all) err := c.get(uri, &out) return out, err } diff --git a/woodpecker-go/woodpecker/interface.go b/woodpecker-go/woodpecker/interface.go index ee82d97b19..b1c9172a6d 100644 --- a/woodpecker-go/woodpecker/interface.go +++ b/woodpecker-go/woodpecker/interface.go @@ -56,7 +56,7 @@ type Client interface { // RepoListOpts returns a list of all repositories to which the user has // explicit access in the host system. - RepoListOpts(bool, bool) ([]*Repo, error) + RepoListOpts(bool) ([]*Repo, error) // RepoPost activates a repository. RepoPost(forgeRemoteID int64) (*Repo, error)