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

Filter by source and target branch #1

Closed
gdisanto opened this issue Jan 12, 2022 · 1 comment
Closed

Filter by source and target branch #1

gdisanto opened this issue Jan 12, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@gdisanto
Copy link

gdisanto commented Jan 12, 2022

What feature do you want to see added?

Filter a pull request by source and target branches. For example do not consider pull requests with source branch "develop".

I have no idea what is the easiest way this can be implemented but I had a look at the code and it looks like the BitbucketPullRequest (https://javadoc.jenkins.io/plugin/cloudbees-bitbucket-branch-source/com/cloudbees/jenkins/plugins/bitbucket/api/BitbucketPullRequest.html) class exposes a getId() method to retrieve the pr id.

The Id can be used to retrieve the "fromRef" and "toRef" details from the bitbucket api, for Bitbucket server "https://bitbucket-server.com/rest/api/1.0/projects/{project}/repos/{repo}/pull-requests/{id}".

Upstream changes

No response

@gdisanto gdisanto added the enhancement New feature or request label Jan 12, 2022
gab1one added a commit to gab1one/bitbucket-pullrequests-filter-plugin that referenced this issue Jan 3, 2023
gab1one added a commit to gab1one/bitbucket-pullrequests-filter-plugin that referenced this issue Jan 3, 2023
Nuh added a commit that referenced this issue Feb 27, 2023
Add filtering by pullrequest source and target branch #1
@Nuh Nuh self-assigned this Feb 28, 2023
@Nuh
Copy link
Member

Nuh commented Feb 28, 2023

@gdisanto, thank you for a good idea!

Thanks to changes by @gab1one, this was implemented.
Thank you very much!

A new version has been released.

@Nuh Nuh closed this as completed Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants