Skip to content

Commit

Permalink
fix: Default project key and projectname
Browse files Browse the repository at this point in the history
  • Loading branch information
NazmiAltun committed Feb 20, 2022
1 parent 18e42da commit 5bc063a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ See [action.yml](action.yml) and [Sample Repo](https://github.com/NazmiAltun/dot
**sonar-host-url**: URL of the sonar instance .Default is *https://sonarcloud.io*
**dotnet-build-command**: To build the solution. Default is *dotnet build -v q -nologo --configuration Release*
**project-key**: Sonar project key. Default is *{context.repo.owner}_{context.repo.name}* if not set.
**project-name**: Sonar project name. Default is *context.repo.repo.toLowerCase()* if not set.
**organization**: Sonar organization name. Default is *context.repo.owner* if not set.
**project-name**: Sonar project name. Default is *context.repo.repo* if not set.
**organization**: Sonar organization name. Default is *context.repo.owner.toLowerCase()* if not set.
**test-result-artifacts**: Artifact names of test results that are going to be downloaded. Multiple artifact names should be separated with a comma(,).

## TODO
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ inputs:
description: 'Sonarcloud/Sonarqube organization name.Default is {context.repo.owner} if not set'
required: false
project-name:
description: 'Sonarcloud/Sonarqube project name.Default is {context.repo.repo.toLowerCase()} if not set'
description: 'Sonarcloud/Sonarqube project name.Default is {context.repo.repo)} if not set'
required: false
test-result-artifacts:
description: 'Artifact names of test results that are going to be downloaded. Multiple artifact names should be separated with a comma'
Expand Down
4 changes: 2 additions & 2 deletions src/getScanParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ const getScanParameters = (): ScanParameters => {
let projectName = getInput('project-name');

if (projectKey === '') {
projectKey = `${context.repo.owner}_${context.repo.repo.toLowerCase()}`;
projectKey = `${context.repo.owner}_${context.repo.repo}`;
}

if (organization === '') {
organization = context.repo.owner.toLowerCase();
}

if (projectName === '') {
projectName = context.repo.repo.toLowerCase();
projectName = context.repo.repo;
}

return {
Expand Down

0 comments on commit 5bc063a

Please sign in to comment.