Analysis are failing because github pullrequest cannot be found on azure devops

We are using sonarcloud on an Azure devops CI environment, but the code in a private github repository. The analysis on the main branche are working fine and new issues are added to sonarcloud. But the pull request analysis is failing after a few seconds on the analysys step. The given error is: Could not find the pullrequest with key ‘{ID}’. In the details is stated that the pull request is not found on azure devops. This makes sense, because all the pull requests are on github.

In the sonarcloud administation, I can only set the pullrequest provider to Azure devops or BitBucketCloud. I also tried to set the parameters sonar.pullrequest.provider and sonar.pullrequest.github.repository in the prepare analysis step without any luck.

My sonarcloud login is bound to azure devops, but I’m not able to switch to github, because my billing plan is attached to my devops login. I’ve read there was a switch to github button, but I can’t find it.

Another project in my company is setup the same way and this is working fine.

How can I get the pull requests analysis to work?

Hi @MaartenPeters1983,

You are right, the reason why the pull request are failing are because you organization is bound the Azure whereas your code is hosted on Github (you should login with the provider, that hosts your code).

I will send you a private message to include the logs of the execution as well as the organization key, so I can investigate more and try to find the solution.