Hi,
I’m getting this error on Azure DevOps pipeline for all the project. It works fine when I run the pipeline from the branch itself but gives me an error when it after creating the PR or after the code merge.
INFO: Working dir: /home/vsts/work/1/s/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=632ms
INFO: Check ALM binding of project 'XXXXXXXXXXXX'
INFO: Detected project binding: BOUND
INFO: Check ALM binding of project 'XXXXXXXXXXXX' (done) | time=638ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=693ms
INFO: Load branch configuration
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 33.410s
INFO: Final Memory: 20M/70M
INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution
ERROR: Could not find the pullrequest with key '8021'
ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=XXXXXXXXXXXXXX&pullrequestKey=8021 : {"errors":[{"msg":"Unable to find the pullrequest with key \u00278021\u0027"}]}
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
ERROR: Error during SonarScanner execution
ERROR: Could not find the pullrequest with key '8021'
ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=XXXXXXXXXXXX&pullrequestKey=8021 : {"errors":[{"msg":"Unable to find the pullrequest with key \u00278021\u0027"}]}
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
##[error]The process '/home/vsts/work/_tasks/SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1/1.38.0/sonar-scanner/bin/sonar-scanner' failed with exit code 2
Finishing: Sonar Cloud Analysis