Skip to content

Commit

Permalink
Fix woodpecker-go (#2090)
Browse files Browse the repository at this point in the history
Closes #2083 

This is breaking because I removed the old, unused `sync` parameter
(#2083).
  • Loading branch information
qwerty287 committed Aug 3, 2023
1 parent f9ec800 commit 1768504
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cli/repo/repo_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions woodpecker-go/woodpecker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion woodpecker-go/woodpecker/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1768504

Please sign in to comment.