404 error on pull requests

We’re encountering an error with adding a new repo to our private SonarCloud. We’ve been able to add several other repositories using the same methods, but one is not working. The pipeline succeed when run on a trigger in the branch, but when triggered by a pull request we the attached error.

  • ALM used: Azure DevOps
  • CI system used: Azure DevOps
  • Error observed:
Could not find the pullrequest with key '71'
ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=name&pullrequestKey=71 : {"errors":[{"msg":"Requested resource wasn\u0027t found on Azure DevOps.","reason":"AZURE_DEVOPS_UNABLE_TO_FETCH_REQUESTED_RESOURCE"}]}
ERROR: Error during SonarScanner execution

Hey there @akinm

I am going to send you a private message.

Working with @akinm we realized that the wrong project key was being used – the result of having two repositories in separate Azure DevOps projects (in the same organization) with the same name. Once the right project key was used, the issue was resolved.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.