Issue in SonarQube PR analysis

Hello Team,

I’m using SonarQube 8.9.6v and I’m trying to do PR analysis and it works but displays the below error message for PR’s:
Could not find ref ‘develop’ in refs/heads, refs/remotes, refs/remotes/upstream or refs/remotes/origin. You may see unexpected issues and changes. Please make sure to fetch this ref before pull request analysis and refer to the documentation.

I did run scan for develop branch and it has been analysed successfully.
JFYI, I’m running the build through Jenkins using source as Bitbucket.

Apart from the above, I tried to prevent merge of PR by adding code insights in bitbucket but results are not being fetched and I see this error message in PR’s:
Pull request decoration did not happen. Failed to access Bitbucket Server, the repository or the pull request

I did see ALM integration and it looks fine and configure project pull request decorations as well. Please see the attachment.

Kindly help me fix these issues.

Thanks in advance!!

Hello @Ramya_Yarru,

In the future please make sure that you open one separate thread for each separate issue, even if they are somewhat around the same feature.

  1. About the message Could not find ref ‘develop’ in refs/heads, refs/remotes, refs/remotes/upstream or refs/remotes/origin. You may see unexpected issues and changes this is typically due to the fact that you perform a shallow clone in your pipeline. SonarQube requires a full depth clone. See SCM Integration | SonarQube Docs

  2. About your decoration / insight not working, besides the central administration ALM integration configuration (your screenshot), you must also configure project level Pull Request ALM integration settings as below. Did you do that ? Can you send a screenshot of your project settings ?