Template for a good new topic, formatted with Markdown:
ALM used is Azure DevOps
CI system used is Azure DevOps
Source code repository is Bitbucket
Organization is setup with Bitbucket
Scanner command used when applicable
Languages of the repository is C#
Error observed
‘’‘ERROR: Could not find the pullrequest with key’‘’
Steps to reproduce:
PR build pipeline triggered by new PR fails with above error.
Potential workaround
Rerun pipeline manually with the feature branch for the PR and it works fine
Note: Works fine in another project. The only difference I can think of is that the other project was added first and it’s using Visual Studio for the build instead of dotnet.
Can anyone help with this issue. We have other repos that work just fine and stuck as to why this is an issue for one repo. Any advice on how to troubleshoot this issue. Seems like a common issue with SonarCloud but not a single simple solution.
1 “what do you use to connect to SonarCloud?”
I do not understand this question. The full configuration is given in the beginning of this thread.
2 “Is your project correctly bound to bitbucket on SonarCloud as well ?”
Yes. As noted above I can generate an analysis report if I run the build manually. It’s just when the build is triggered through a new PR that it fails, and it fails when trying to find the PR. It is looking for the correct PR number, and that PR number is present, but it cannot find it.
Can you try again analysing a PR with this project/pipeline please ? So that we can get the logs internally. Also, I will send you a PM so that you can give me the organization/project key.
Issue is resolved : the SonarCloud project was bound and linked to an incorrect repository, that’s why the PullRequests were not found, after recreating a project and linked it to the correct one, it worked again.