Could not find the pullrequest with key '69'

Getting below error for pull request (Github Action)

INFO: Auto-configuring pull request 69
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 24.834s
INFO: Final Memory: 6M/24M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
ERROR: Could not find the pullrequest with key ‘69’

Welcome to the Community!

Does the pull request exist on GitHub? Is it public?

Does it happen again if you push a new commit to the pull request?

Does it happen to all pull requests of the project?

Hi Janos ,
Thanks for reply , please find below comments

Does the pull request exist on GitHub? Yes
Is it public? No , its private repository
Does it happen again if you push a new commit to the pull request? Yes , on push also and on new pull request also

Does it happen to all pull requests of the project? Yes

Please share the complete scanner command, with all scanner parameters. I’m most interested in the parameters related to pull request analysis. If you use a sonar-project.properties file too to configure the scanner, please share its content too. With private details masked.

Hi,

We are using GitHub Action sonarsource/sonarcloud-github-action@master

sonar-project.properties file content

sonar.projectKey=XXXXX
sonar.organization=XXXXX
sonar.scala.coverage.reportPaths=scoverage.xml

Hi,

I can see in our logs that github returns 404 when we try to fetch the pull request.
This happens if the PR doesn’t exist, or if the SonarCloud GitHub App doesn’t have access to the repository.
Since you said the PR existed, ensure that the SonarCloud GItHub App is installed on your repository.

Let me know if that helps.

Benoit

Hi,

It is working on protected branch push but not working for pull request only.

Please find log attached
log.txt (6.0 KB)

Hi,

Yes, from our logs I can see that it fails for all your projects in your organization, on PR builds.
Can you please confirm that the SonarCloud GitHub App is installed on your repository? If it installed, can you try to uninstall/reinstall it and let me know if it fix the PR analysis.

Worked thanks

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