question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bitbucket cloud's workspaces are not recognized

See original GitHub issue

I leave my original report, but i found that the plugin doesn’t recognize workspaces and treats them as ordinal users and so role parameter is added.

Version report

Jenkins and plugins versions report:

Various. Plugin versions 2.7.0 and 2.9.8 were tested.

Reproduction steps

  • Goto bitbucket cloud
  • Create a workspace and several repositories in the workspace
  • Create a new Bitbucket Team/Project in Jenkins

Results

Expected result:

All those repositories should be listed.

Actual result:

No repositories are listed.

According to official Bitbucket API documentation (https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/{workspace}):

Returns a paginated list of all repositories owned by the specified account or UUID.

The result can be narrowed down based on the authenticated user’s role.

E.g. with ?role=contributor, only those repositories that the authenticated user has write access to are returned (this includes any repo the user is an admin on, as that implies write access).

This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.

So, role=owner makes sense only for a personal workspace. For organizations it should be omitted (in that case it’s implicitly role=member) or made configurable (admin/contributor/member/owner).

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
guimarcacommented, Aug 26, 2021

Well, in the end it depends on the role the user has on the repository. Out situation is the following: we are using bitbucket workspaces, and we have a user for jenkins tha is a member of the workspace. With this confguration and role=‘member’, everything works. If the #475 is merged with role=‘admin’ it will work as long as you make use jenkins bitbucket user admin in all repositories. It is less convenient that handling that with just workspace membership, but it’d work.

0reactions
guimarcacommented, Aug 26, 2021

I see, maybe the member role is not enough for that

Read more comments on GitHub >

github_iconTop Results From Across the Web

Workspaces and repositories not showing in https
Solved: I have an issue where the details of the workspace are not populating using https://api.bitbucket.org/2.0/workspaces .
Read more >
Cannot push to Git repository on Bitbucket - Stack Overflow
Make sure you set the ssh key on your account, Repository settings Access keys are for read-only access (basically just pull). The read/write...
Read more >
Import your project from Bitbucket Cloud to GitLab - GitLab Docs
Verify that the username in the Bitbucket account settings matches the public name in the Atlassian account settings. If they don't match, modify...
Read more >
Bitbucket connections - AWS CodePipeline
You can create connections to a Bitbucket Cloud repository. Installed Bitbucket provider types, such as Bitbucket Server, are not supported.
Read more >
Sonarcloud App in BitBucket stopped working
Although this time it seems the entire widget etc is not loading only for the company workspace repositories. AlxO (Alex Odoux) April 5,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found