Skip to content

Extra property in nx run for sonar.newBranch.referenceBranch=master doesnt work #115

Open
@frantisekdolsky

Description

@frantisekdolsky

If possible, please provide a reproduction repository you discovered this bug in.

No response

Which area/package is the issue in?

@koliveira15/nx-sonarqube

Description

First of all, I'm not really sure if I configure my github workflow properly. All works except providing extra option in nx run command (rather than in project.json). When I run following command:
npx nx run myapp:sonar --sonar.newCode.referenceBranch=master --parallel=1 --branch="${{ github.ref_name }}"

I also tried:
npx nx run myapp:sonar --parallel=1 --extra='{"sonar.newCode.referenceBranch": "master"}' --branch="${{ github.ref_name }}" - same result.

analysis is successful, but the new code definition is still in SonarQube for that specific branch marked as "project setting`. Do I provide wrong extra parameter? If yes, how can I override it? I wanna provide this extra option in nx command rather than in project.json, because it will differ for various branches.

To clarify why using cli rather than project.json for this specific property, we need to assign different newCode branch for various scenarios. For example for feature branch we refer to master, for release branch we refer to previous release branch, for master we release for latest release branch.

If applicable, please provide the Nx report

No response

Please provide the exception or error you saw

No response

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions