fix(bitbucket): use last created PR in decision process #32672
+88
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
When looking for an existing PR in the decision process, use the last PR created (using it's number) as it the the one with the last up to date intention of the dev team (approved,ignored, comments...)
Context
Renovate running manually as docker container, against repos on BitBucket cloud.
A non immortal PR has been created and merged.
But it was en error and the dev team, manually revert the merge commit.
Renovate still propose new PR for the same patch and the dev team can no more ignore the patch (declining subsequent PRs has no effect)
When a non immortal PR has been created multiple times, the decision process was taking the first PR returned by BitBucket cloud who happens to sort by ascending number (oldest -> newest).
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: