Automate Branch level New Code definition

Currently using Sonarqube 8.5
Only Branch Analysis is available towards my project at this moment.
Is there any possible way to configure reference branch for new code definition automatically?
https://docs.sonarqube.org/latest/project-administration/new-code-period/

Is it possible that can be achieved if I switched to PR analysis mode? I can see that some commands may help, such as “sonar.pullrequest.base”, not sure if they are applicable?

Cheers

If switch to PR analysis mode, will the following line be useful?

-Dsonar.pullrequest.base=${env.CHANGE_TARGET} \

As the former way to do that via property sonar.branch.target has vanished with Sonarqube 8 it’s only possible to set this with the web api or via web ui, the default new code setting for a branch is previous version

Otherwise when using PR analysis which is activated with properties
sonar.pullrequest.key, sonar.pullrequest.branch, sonar.pullrequest.base
the new code is defined by branch and base.
see Pull Request Analysis | SonarQube Docs

Thank you!!!