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

#909: Use default branch as Pull Request base when target does not exist #950

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

mc1arke
Copy link
Owner

@mc1arke mc1arke commented Aug 18, 2024

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

sonarcloud bot commented Sep 6, 2024

@mc1arke mc1arke merged commit 405c894 into master Sep 6, 2024
12 checks passed
@mc1arke mc1arke deleted the issue/909 branch September 6, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQ 10.3.0-community + plugin 1.18.0 got error "No branch exists in Sonarqube with the name"
1 participant