If the SonarCloud GitHub action is run from the pull request, it fails with the following error:
ERROR: Error during SonarScanner execution
ERROR: A pull request analysis cannot have the branch analysis parameter 'sonar.branch.name'
Example of the failed GitHub action can be found here.