From 237b2257f5633374a3b28babb2a2d5eef8b30b50 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:45:42 +0100 Subject: [PATCH] Fix bitbucket org fetching (#2874) closes #2793 --- server/forge/bitbucket/internal/client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/forge/bitbucket/internal/client.go b/server/forge/bitbucket/internal/client.go index 1e6deb2825..32839e0879 100644 --- a/server/forge/bitbucket/internal/client.go +++ b/server/forge/bitbucket/internal/client.go @@ -39,7 +39,8 @@ const ( pathUser = "%s/2.0/user/" pathEmails = "%s/2.0/user/emails" pathPermissions = "%s/2.0/user/permissions/repositories?q=repository.full_name=%q" - pathWorkspace = "%s/2.0/workspaces/?%s" + pathWorkspaces = "%s/2.0/workspaces/?%s" + pathWorkspace = "%s/2.0/workspaces/%s" pathRepo = "%s/2.0/repositories/%s/%s" pathRepos = "%s/2.0/repositories/%s?%s" pathHook = "%s/2.0/repositories/%s/%s/hooks/%s" @@ -92,7 +93,7 @@ func (c *Client) ListEmail() (*EmailResp, error) { func (c *Client) ListWorkspaces(opts *ListWorkspacesOpts) (*WorkspacesResp, error) { out := new(WorkspacesResp) - uri := fmt.Sprintf(pathWorkspace, c.base, opts.Encode()) + uri := fmt.Sprintf(pathWorkspaces, c.base, opts.Encode()) _, err := c.do(uri, get, nil, out) return out, err }