Skip to content

Commit

Permalink
client: Fix RepoPost path (#2091)
Browse files Browse the repository at this point in the history
Closes #2088
  • Loading branch information
runephilosof-karnovgroup authored Aug 3, 2023
1 parent 0314cb5 commit 235619e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion woodpecker-go/woodpecker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 235619e

Please sign in to comment.