Workday / mps-code-reviewer

Code Review for JetBrains MPS providing integration with Bitbucket
Apache License 2.0
15 stars 7 forks source link

Unable to use mps code reviewer with bitbucket cloud #11

Open bkolb opened 6 years ago

bkolb commented 6 years ago

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/

justinhorton commented 6 years ago

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/

ty1824 commented 6 years ago

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.

justinhorton commented 6 years ago

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.

ty1824 commented 6 years ago

As App Passwords work effectively the same way as Personal Access Tokens, I would prefer this approach over OAuth2, initially.