Hello!
I’m using the SonarQube Community Edition (version 24.12.0.100206) integrated with Azure Pipelines. I configured my azure-pipelines.yml to perform SonarQube analysis on pull requests. However, every time I try to run a scan, SonarQube analyzes only the pull request branch and returns the following warning in the logs: “WARN: Could not find ref ‘refs/heads/release/90’ in refs/heads, refs/remotes, refs/remotes/upstream or refs/remotes/origin”.
I also tried running some Git commands in the pipeline to ensure SonarQube can access the pull request’s target branch, but it didn’t work. Also i’m using the Sonar Community branch Plugin to run analysis on another branchs.
This block ensures that the PR’s target branch is available locally in the build agent’s Git repository, allowing code comparison between branches - for example, for correct calculation of incremental test coverage or differential code analysis.