New code has commits/changes from master

I am using Developer Edition Version 8.1 (build 31237).

Jenkins Job Setup for sonarqube

  1. For every git pull request.
  2. For every commit to master.

Our PR merge strategy to master is by “Squad and Merge”.

Issue

  1. The Pull Request has new code that are part of the master commits. Hence the new coverage fails saying that the coverage is low although they are not part of the current PR.

  2. If I look at the code smells, it says something along the lines of,

The issue has been copied from branch ‘#4252’ to branch ‘#4284’.

This prevents me from setting up sonarqube as mandatory check in the github pull request.

PS:

  1. I am not doing a shallow clone. Verified it by running
    git fetch --unshallow
    fatal: --unshallow on a complete repository does not make sense

  2. My code period is set to every revision. Every commit to master is tagged as a revision.