mps-code-reviewer
mps-code-reviewer copied to clipboard
Unable to use mps code reviewer with bitbucket cloud
Bitbucket cloud does not support personal access tokens. Instead one has to create either an app password or an oAuth key. The plugin should be able to deal with either of those.
See https://developer.atlassian.com/cloud/bitbucket/authentication-for-apps/
We also need to be wary of API differences between Bitbucket Cloud and Bitbucket Server. We should make separate configurations for each since we'll need to hit different endpoints (and API versions) for the same actions, and possibly hide certain functionality if it's not available.
Here's another page on OAuth2 tokens for Bitbucket Cloud: https://developer.atlassian.com/cloud/bitbucket/oauth-2/
I agree - and I would expect a new configuration for each of the different offerings (Bitbucket Server, Bitbucket Cloud, and vanilla Bitbucket) as they do/can have some substantial differences. Non-Bitbucket offerings would be the same - different configurations.
Here's the doc on creating an application password: https://confluence.atlassian.com/bitbucket/app-passwords-828781300.html
This is how to make a request with that password (Basic auth):
curl --user userName:appPassword https://api.bitbucket.org/1.0/user/repositories
I'm unsure if we want to support this flow, or OAuth2.
As App Passwords work effectively the same way as Personal Access Tokens, I would prefer this approach over OAuth2, initially.