Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45836

Repositories you contribute to but don't own won't appear in Branch Source Plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      A Bitbucket repository which is owned by an individual account can't be used with Jenkins as the Branch Source Plugin Currently functions.

      Currently, when loading the repositories after entering the Owner name, It makes a request to the BB API essentially "Give me all projects the credentialed user is a teammember on, or all repos owned by the crednetialed user, which are also owned by the username above".

      This causes a gap in the repo you're attempting to build is not a part of a project that your jenkins account is a team-member on, but instead is just a contributor for on someone else's repo. 

      In Version 2.1.x  the repository name was just a text field, allowing you to enter owner and repo manually and it worked fine. My Jenkins is now stuck at that version (and the related old versions of other plugins) because it can't properly select our repo anymore.

       

        Attachments

          Issue Links

            Activity

            Hide
            ironsean Sean MacKay added a comment -

            I confirmed as well, if I create a repo owned by my account I can see it. And if it's a repo on a team I'm an administrator  or member on on I can see it. But if it's a repo owned by another account that you have Read and Write permissions for, but don't own, administrate, or belong to a team for then you can't see it.

            Though this I do see a potential workaround for myself now, which is get a proper Bitbucket team set up for that repo.

            Show
            ironsean Sean MacKay added a comment - I confirmed as well, if I create a repo owned by my account I can see it. And if it's a repo on a team I'm an administrator  or member on on I can see it. But if it's a repo owned by another account that you have Read and Write permissions for, but don't own, administrate, or belong to a team for then you can't see it. Though this I do see a potential workaround for myself now, which is get a proper Bitbucket team set up for that repo.
            Hide
            abayer Andrew Bayer added a comment -

            Ok, so I have literally no background with Bitbucket or this plugin, but I'll see what I can do until someone who actually knows it comes along. =)

            It looks like relevant code is here - I guess we're saying "If you're in a team, we don't specify a UserRoleInRepository, but if you aren't in a team, we assume you're an owner". I'm guessing we should instead be defaulting to CONTRIBUTOR? I'm not sure if there's some issue with that down the line - i.e., you can't set up webhooks for a repo if you just have read/write...

            Show
            abayer Andrew Bayer added a comment - Ok, so I have literally no background with Bitbucket or this plugin, but I'll see what I can do until someone who actually knows it comes along. =) It looks like relevant code is here - I guess we're saying "If you're in a team, we don't specify a UserRoleInRepository , but if you aren't in a team, we assume you're an owner". I'm guessing we should instead be defaulting to CONTRIBUTOR ? I'm not sure if there's some issue with that down the line - i.e., you can't set up webhooks for a repo if you just have read/write...
            Hide
            ironsean Sean MacKay added a comment -

            I created the following Pull Request with that suggestion:

            https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/71

            Is there a way I can build and test it locally? The `Messages` Symbol currently can't resolve, so I can't even build it. But if I solve that can I build it as a plugin then manually upload to Jenkins to verity it works?

            Show
            ironsean Sean MacKay added a comment - I created the following Pull Request with that suggestion: https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/71 Is there a way I can build and test it locally? The `Messages` Symbol currently can't resolve, so I can't even build it. But if I solve that can I build it as a plugin then manually upload to Jenkins to verity it works?
            Hide
            ironsean Sean MacKay added a comment -

            Updated the ticket title and description. The newest release 2.2.5 also does nothing to address this. My PR is still available I believe, and I'm still using 2.1.2 in order to keep Jenkins functional.

            Show
            ironsean Sean MacKay added a comment - Updated the ticket title and description. The newest release 2.2.5 also does nothing to address this. My PR is still available I believe, and I'm still using 2.1.2 in order to keep Jenkins functional.
            Hide
            stephenconnolly Stephen Connolly added a comment -

            2.2.8

            Show
            stephenconnolly Stephen Connolly added a comment - 2.2.8

              People

              • Assignee:
                Unassigned
                Reporter:
                ironsean Sean MacKay
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: