From da8190ebfeb9e95c830c265a662dfe00fef019d5 Mon Sep 17 00:00:00 2001 From: runephilosof-karnovgroup <101270124+runephilosof-karnovgroup@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:41:01 +0200 Subject: [PATCH] client.go: Fix RepoPost path --- woodpecker-go/woodpecker/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/woodpecker-go/woodpecker/client.go b/woodpecker-go/woodpecker/client.go index 3e7b53dea0..b06e3aa570 100644 --- a/woodpecker-go/woodpecker/client.go +++ b/woodpecker-go/woodpecker/client.go @@ -28,6 +28,7 @@ import ( const ( pathSelf = "%s/api/user" pathRepos = "%s/api/user/repos" + pathRepoPost = "%s/api/repos?forge_remote_id=%d" pathRepo = "%s/api/repos/%d" pathRepoLookup = "%s/api/repos/lookup/%s" pathRepoMove = "%s/api/repos/%d/move?to=%s" @@ -174,7 +175,7 @@ func (c *client) RepoListOpts(sync, all bool) ([]*Repo, error) { // RepoPost activates a repository. func (c *client) RepoPost(forgeRemoteID int64) (*Repo, error) { out := new(Repo) - uri := fmt.Sprintf(pathRepo, c.addr, forgeRemoteID) + uri := fmt.Sprintf(pathRepoPost, c.addr, forgeRemoteID) err := c.post(uri, nil, out) return out, err }