I am running sonar-scanner with help of sonarqube.yml this code code snippet from there
- name: Run sonarqube
run: sonar-scanner
-Dsonar.scm.provider=git
-Dsonar.login=${{ secrets.SONARQUBE_TOKEN }}
-Dsonar.pullrequest.key=${{ github.event.number }}
-Dsonar.pullrequest.branch=${GITHUB_HEAD_REF#refs/heads/}
-Dsonar.pullrequest.base=${GITHUB_BASE_REF#refs/heads/}
-Dsonar.pullrequest.github.repository=${GITHUB_REPOSITORY}
-Dsonar.pullrequest.github.endpoint=${GITHUB_API_URL}
Error after creating merge request

- SonarQube Scanner version 4.2.0.1873
- SonarQube server version 9.0.1
i see in executing log that is remaining -Dsonar.pullrequest.key= to be equal to undefined
Run sonar-scanner -Dsonar.scm.provider=git -Dsonar.login=*** -Dsonar.pullrequest.key= -Dsonar.pullrequest.branch=${GITHUB_HEAD_REF#refs/heads/} -Dsonar.pullrequest.base=${GITHUB_BASE_REF#refs/heads/} -Dsonar.pullrequest.github.repository=${GITHUB_REPOSITORY} -Dsonar.pullrequest.github.endpoint=${GITHUB_API_URL}