MunifTanjim / node-bitbucket

Bitbucket API client for Browser and Node.js
https://bitbucketjs.netlify.app
MIT License
106 stars 28 forks source link

Using with teams #12

Closed mattmcginnis closed 5 years ago

mattmcginnis commented 5 years ago

I tested this with a username and password on an account/repo combination that is not in a team and it works fine. When I use it with an account/repo that is team based, I get a 404 because username/repoName is not found, even though that repo is shown on the users repo list page. I'm using this for pullrequests.create, refs.listBranches, repositories.getPullRequestDiff, repositories.mergePullRequest.

I have verified the user has write access to the repo.

Is it possible to use this with a team-based repo? If so, how?

mattmcginnis commented 5 years ago

I'll answer my own question. :)

This can either be the username or the UUID of the account, surrounded by curly-braces, for example: {account UUID}. An account is either a team or user.

So, the call to authenticate should specify the username and password and the "username" for the API call should be the team name.