Pull Request - I see unexpected Quality Risks outside my modified code

Problem

I see a higher number of QRs in the Chrome Extension than the amount of modified/added code of my Pull Request. Few of the QRs are even in files not modified in my specific PR !

Cause #1 (Most common)

The target branch contains commits that were not merged from the target branch to the pull request branch

Solution #1

Configure the pull request flow to merge from the target branch (even if done locally) prior to running the build scanner

//retrieve the PR source code from the Git based SCM git clone git@github.repo/repo.git //create a local integration branch starting from the target branch - do not push it to the remote git checkout -b <local-integration-branch-name> <target-branch> //Merge pull request into local integration branch git pull --ff git@github.repo/repo.git <pull-request-branch> ... //run sealights build

Cause #2

The target branch contains commits that were not reported to SeaLights and the user merged from the target branch to the pull request branch.

A common reason is with target branch that have builds reported based on predefined frequency (hourly, daily) rather than after every single merge (commit) to that branch.
Sealights recommendation is for the later option.

Solution #2

Validate in the CI server (Jenkins, Bamboo…) that the every commit from the SCM (target branch) is reported to Sealights via an automated build.
If not, initiate a build from both the target branch and then the PR branch.