From 764400c6800b72f5cd9cc73d283b4d28f84df8fc Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Sun, 26 Nov 2023 09:03:03 +0100 Subject: [PATCH] Fix bitbucket org fetching --- 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 1e6deb28252..32839e08793 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 }