SonarCloud github extension shows passed but fails in master after merging the same PR

Template for a good new topic, formatted with Markdown:

Hello @akshatdubeysf,

what do you mean by “scan fails”? There are some issues detected in the main branch, that’s why Quality Gate is red. I don’t see that scan is failing.


Sorry, I mean the quality gate shows failed for the master branch, but that happens only because of the mentioned PR, even though it passed the PR without showing any issues.

Hey @akshatdubeysf , could you please tell me if this is happening with other PRs? If yes, can you share which one(s)? If not, would make sense to state that only this PR had this problem?

Hi @Alexandre_Holzhey ,

This seems to be happening for every PR from a fork, for example, this is another PR with the same issue- feat(user-tenant-service): adds user tenant service by sumiter92 · Pull Request #772 · sourcefuse/loopback4-microservice-catalog · GitHub

Thanks for the information! You say that this PR (772) has the same issue, which means it has QG passed at PR but QG failed in master after merge. I don’t understand how, since the PR is still open, could you clarify please?

I mean I can see the same issues in the code, and it would show those as issues only once it is merged.

Hello @akshatdubeysf , unfortunately SonarCloud automatic analysis does not support yet analysis on an external pull request (fork). This unexpected behavior is exactly the problem we intend to fix. We have this issue in our backlog already.

Please let me know if you find this same issue in a PR that is not from a fork/external PR.

1 Like