Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitbucket Server Repo IsCollaborator not working #310

Open
Timoses opened this issue Dec 3, 2021 · 4 comments
Open

Bitbucket Server Repo IsCollaborator not working #310

Timoses opened this issue Dec 3, 2021 · 4 comments

Comments

@Timoses
Copy link

Timoses commented Dec 3, 2021

Attempting to create Lighthouse Triggers with bitbucketserver as SCMProvider.

However, it never identifies anybody as Collaborator.

I assume the error lies here:

path := fmt.Sprintf("/2.0/workspaces/%s/permissions/repositories/%s?q=user.account_id=\"%s\"", wsname, reponame, user)

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

@ankitm123
Copy link
Member

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!

@Timoses
Copy link
Author

Timoses commented Dec 3, 2021

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
Copy link
Author

Timoses commented Dec 3, 2021

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.

@ankitm123
Copy link
Member

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!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants