Pull request is getting scanned successfully but when merged it into develop branch then it gives us an error “ERROR: A branch analysis cannot have the pull request analysis parameter 'sonar.pullrequest.key” by running below commands-
*-Dsonar.pullrequest.key=${{ github.event.number }} *
*-Dsonar.pullrequest.branch=${{ github.HEAD_REF }} *
*-Dsonar.pullrequest.base=${{ github.BASE_REF }} *
-Dsonar.pullrequest.github.repository=${{ github.repository }}
Is there any way to check if it’s a pull request or a branch to handle it something like if else statements?
Thanks in advance!