Compute New Code for the reference branches other than Main branch not found

Following with the previous question I was trying to dig more about the previous issue. I have updated the project setting comparison to the Reference branch as a feature branch other than Integration branch(MAIN BRANCH)

Details

  • which versions are you using Developer EditionVersion 8.9.8 (build 54436)
  • what are you trying to achieve I want to compare the feature branch other than MAIN BRANCH using the project settings - Reference branch
  • what have you tried so far to achieve this Tried under project settings->Project setting->Define a specific setting for this project--> Reference branch- Selected a feature branch(not MAIN BRANCH)

Scanner console log:

INFO: ------------- Run sensors on project
2022-06-08 16:32:05.121 INFO: Load New Code definition
2022-06-08 16:32:05.121 INFO: Load New Code definition (done) | time=7ms
2022-06-08 16:32:05.121 INFO: Computing New Code since fork with ‘PI24/Sprint-3/SonarPR_Decoration’
2022-06-08 16:32:05.121 WARN: Could not find ref ‘PI24/Sprint-3/SonarPR_Decoration’ in refs/heads, refs/remotes, refs/remotes/upstream or refs/remotes/origin
2022-06-08 16:32:05.121 WARN: Branch ‘PI24/Sprint-3/SonarPR_Decoration’ not found in git
2022-06-08 16:32:05.121 WARN: Failed to detect fork date. No New Code will be computed.
2022-06-08 16:32:07.713 INFO: Analysis report generated in 1159ms, dir size=11 MB
2022-06-08 16:32:33.206 INFO: Analysis report compressed in 24289ms, zip size=5 MB
2022-06-08 16:32:33.206 INFO: Analysis report uploaded in 739ms
2022-06-08 16:32:33.206 INFO: ANALYSIS SUCCESSFUL, you can browse http://1.1.1.1:9000/dashboard?id=AndroidProduction&branch=PI24%2FSprint-3%2FSonarPR_Check

Git SCM

checkout([$class: 'GitSCM', branches: [[name: '*/'+env.BRANCH_NAME]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', depth: 0, honorRefspec: true, noTags: false, reference: '', shallow: false, timeout: 20]], userRemoteConfigs: [[credentialsId: '6732asdajsd783-3298sa', url: 'ssh://tfsemea.com:22/tfs/Region/_git/AndroidProduction', refspec: '+refs/heads/'+env.BRANCH_NAME+':refs/remotes/origin/'+env.BRANCH_NAME]]])

Kindly help me to setup the feature branch as a reference branch for the analysis.

Hi,

This is about Git. This response should help:

 
Ann