-
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
[JENKINS-57775][JENKINS-62780] Handle PRs from/to non existing src/dest #322
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.
Looks like you ran into some spotbugs issues.
When testing against Bitbucket Server (7.2.1), I could not reproduce such scenario:
- PR opened from deleted source branch or forked are automatically declined.
- Bitbucket Server does not let me delete a destination branch if there is an open PR against it: "You cannot delete this branch since it has at least one open pull request associated with it"
Since you're controlling/mocking the responses, you could create a custom one that has these behaviors right?
Regardless of whether you can get the server to do it currently, it seems like something that should be tested to ensure it is handled.
if(this.branch != null) { | ||
// redound available the informations into impl objects | ||
if(this.branch != null && this.commit != null) { | ||
// redound available the information into impl objects |
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.
"redound"?
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.
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.
It should was " re bind"
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.
@bitwiseman I want heavy remember to you branch-api-plugin#160
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.
@nfalco79 I hear you.
...dbees/jenkins/plugins/bitbucket/client/pullrequest/BitbucketPullRequestValueDestination.java
Outdated
Show resolved
Hide resolved
I am not sure that those behaviors are even possible from Bitbucket Server. |
d6759dc
to
f7b3a48
Compare
Fix NPEs caused by deleted source and destination branch or repository of PRs.
Tested the different scenario against Bitbucket Cloud and confirmed that:
source.repository
can benull
(deleted source repository)source.commit
can benull
(deleted source repository)destination.commit
can benull
(deleted destination branch)I haven't been able to reproduce a nullable
source.branch
ordestination.branch
.When testing against Bitbucket Server (7.2.1), I could not reproduce such scenario:
Your checklist for this pull request