Sonarcloud analysis fails to analyze reports for pull request

We were able to resolve this issue. And I want to share it here so that it can be useful for others.

We tried looking around for this error and figured out that we had added different project to sonarcloud which has same name in our different group under our organization.

As shown in screenshot below, when we try to add a project to sonarcloud , we can see that under our organization , we have multiple projects with same name present .

As there was no differentiator for both of them I made a mistake of selecting any one of them .

Later, We found out that both of them are from two different group. Branch analysis worked as it was a simple sonar-scanner push but when we tried pushing pull request analysis , it was not able to find out that particular PR.

From following screenshot below, when we clicked on gitlab symbol ,we were able to figure out under what group the project is present.

I hope it helps.

Thanks
Anjali