-
Notifications
You must be signed in to change notification settings - Fork 354
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
Adding Bitbucket repository information to request to allow traits to filter by project #127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add newline at the end of file to files that is missing it.
Please provide a unit test to the new trait filters
@Casz can you provide assistance on how @michelzanini can move this code into an extension plugin. I’m currently tied up on other stuff and I don’t want them getting disillusioned and abandoning their efforts. @michelzanini This looks good, but the policy I have been following is to encourage people to put these kind of traits in an extension plugin. It shouldn’t be too hard to do, mostly just create a github repo, steal a |
@stephenc gotcha 😅 @michelzanini take a look the one of the following trait plugins to create an extension plugin: if you need any questions answered, please, ask away 👍 |
Hi @stephenc , The problem of doing it as an extension plugins is that I won't be able to pass down the project key / name from the first request that is done to Bitbucket. |
The edit to the JSON @michelzanini would properly be allowed in this plugin, but the filtering will have to be in the extension plugin so should be all good 👍 |
Ok @Casz so I will move the traits out of here to an extension plugin and keep the JSON and BitbucketSCMNavigator / BitbucketSCMNavigatorRequest changes in this PR. |
Sounds like a plan 👍 |
@michelzanini you can deploy a snapshot if use |
…epository information to BitbucketSCMNavigatorRequest to allow traits to filter repositories based on which project they belong to
384e2f7
to
ece4a54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome 👍
I have changed the PR description to match the code and updated it so I can implement the extension plugin on top of this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rsandell can you review if you get a chance?
@michelzanini Let me know if you'd like additional testing - I'm looking forward to this feature being available. |
@amuniz can you cut a release? |
I don’t have time to review much |
With this change merged and a new release of the branch source plugin released I was expecting to find the ability to filter based on projects (for BB Cloud). However I don't see any new capability to filter based on project. |
@cyrus-mc It will be done on a separated plugin, I am working on it. Should be out in a week or so. |
@cyrus-mc , @coltrey , this plugin is now released and available here: |
Hi,
I have written a trait to filter Bitbucket cloud projects as originally tried on PR #16.
However, it was suggested that such traits could be an extension plugin. I will implement such plugin but I need more information to be available so a trait can filter a project without doing any more additional API calls.
This changes here are adding the BitbucketRepository object to a request, that can later be filtered by a trait. I also included additional JSON fields to parse the project.
I have tested this with both Bitbucket server and cloud.
I have not added or changed any test cases as I do not see any tests testing the parts I have changed, please advise, if necessary I can add them.
Thanks.