go-scm icon indicating copy to clipboard operation
go-scm copied to clipboard

Bitbucket Server Repo IsCollaborator not working

Open Timoses opened this issue 4 years ago • 4 comments

Attempting to create Lighthouse Triggers with bitbucketserver as SCMProvider.

However, it never identifies anybody as Collaborator.

I assume the error lies here: https://github.com/jenkins-x/go-scm/blob/499f2b2a95a1277100c91f6d207c99edb9ea452e/scm/driver/bitbucket/repo.go#L186

This fits the Bitbucket Cloud API: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/#api-user-permissions-workspaces-get

However the Bitbucket Server API seems to work differently: https://docs.atlassian.com/bitbucket-server/rest/7.18.1/bitbucket-rest.html#idp297

Timoses avatar Dec 03 '21 12:12 Timoses

I can take a look at it next week (unless u contribute first, then I am happy to review), I think our support for bitbucket cloud is a bit rough, we are improving gitlab integration atm, but bitbucket is right there after that!

ankitm123 avatar Dec 03 '21 14:12 ankitm123

Well, the problem seems to be that Bitbucket Server and Bitbucket Cloud have incompatible APIs, don't they?

I don't know if go-scm is able to determine the difference and adjust API calls based on that.

Timoses avatar Dec 03 '21 14:12 Timoses

I intended to find a JX community channel somewhere to ask this, but perhaps this is also a good spot:

Do you intend to build out support for Bitbucket Server? Since Atlassian is moving to Cloud and ends support for Server product in 2024.

Timoses avatar Dec 03 '21 14:12 Timoses

I intended to find a JX community channel somewhere to ask this

https://jenkins-x.io/community/#slack

Do you intend to build out support for Bitbucket Server? Since Atlassian is moving to Cloud and ends support for Server product in 2024.

Honestly, it would be good to see how much effort needs to be put in to support both server and cloud, like if it's only a change in go-scm, and that will make it work with the rest of Jenkins X, we are fine with supporting bit bucket server till 2024 (still 2 years away!).

ankitm123 avatar Dec 03 '21 15:12 ankitm123