PullRequest Decorator for C# project in gitlab

Hey there.

This is probably the issue. When you manually configure branch analysis, we flip auto-detection for branches/merge requests off. This means when you run a Merge Request build (I assume you run a build/analysis on each MR), the “wrong” kind of analysis is being performed.

I would suggest removing this, and relying on the presence of these environment variables being available in your scanner environment.

CI_COMMIT_REF_NAME //sonar.branch.name
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME //sonar.pullrequest.branch
CI_MERGE_REQUEST_TARGET_BRANCH_NAME //sonar.pullrequest.base
CI_MERGE_REQUEST_IID //sonar.pullrequest.key
CI_COMMIT_SHA  //sonar.scm.revision