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.
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.