#909: Use default branch as Pull Request base when target does not exist #15
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.
The resolution of Pull Request details currently uses the project default branch when a pull request is analysed without specifying a target branch. However, when a target branch is specified, the plugin expects that branch to exist and throws an exception if the target branch is not found. To overcome this, the target branch is being resolved to the default branch where no target branch is specified or the requested target branch does not exist. As the API used to gather branch information does not return PULL_REQUEST details, the result of this searching is that a pull request will either target a branch from the main branch, or target the main branch, there is no further nesting or pull requests and branches.