1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-24 10:07:21 +02:00

Fix woodpecker-go (#2090)

Closes #2083 

This is breaking because I removed the old, unused `sync` parameter
(#2083).
This commit is contained in:
qwerty287 2023-08-03 02:39:37 +02:00 committed by GitHub
parent f9ec800481
commit 176850495e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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)