Diagnose missing author information of commits

I think I’m missing the author of the commit here under the left margin here in the “Code” tab. I think SonarQube cannot see any author information for all commits. After some research, I still don’t have much clue on how to diagnose this issue. I’m using GitLab and the author identity should be an email or a full name.


version:
sonarqube-9.3.0.51899
sonar-scanner-msbuild-5.4.0.40033-net46\SonarScanner.MSBuild.exe

Hi,

Welcome to the community!

Can you check your analysis log to see what it says about SCM data collection?

 
Ann

Hi Ann,
I skimmed through these logs in the screenshot. I searched keywords “author”, “scm”, “quan.yu”(the author email username), and also the git commit SHA, but was unable to find entry. Is there anything that I’m missing?

Also, I find in the web UI there’s this “Disable the SCM Sensor” toggle. I think this current setting in the screenshot is correct.

Hi,

I’m asking about the analysis logs on the build agent. Can you look there, please?

 
Ann

Hi,

I checked the logs on GitLab, and find this “WARN: Shallow clone detected, no blame information will be provided. You can convert to non-shallow with ‘git fetch --unshallow’.”

I added GIT_DEPTH: 0 into the .gitlab-ci.yml script to enforce an unshallow copy, and deleted the git repo on the build machine to enforce a fresh git cloning. After this, I can see the author of commits from the SonarQube UI and the issues are now being auto-assigned to the SonarQube accounts.

Thanks for your kind help.

Hi,

I’m glad you worked through this!

 
Ann