Running this action requires a SonarQube User Token generated by the user on whose behalf the action will run.
CreateSonarqubeProject — creates a new project in SonarQube. The action uses the SonarQube Web API to create a project with the specified parameters, such as the project key, project name, main branch, new code definition parameters, and project visibility. Authentication is performed using a SonarQube token, which must be provided in the credentials.
Request example
project: example-project
name: example-project
mainBranch: develop
newCodeDefinitionType: NUMBER_OF_DAYS
newCodeDefinitionValue: '30'
visibility: publicRequest specification
| Name | Required | Description | Possible values | Default value |
|---|---|---|---|---|
| project | Yes | Unique project identifier (Project Key) in SonarQube | - | - |
| name | Yes | Project name displayed in the SonarQube interface | - | - |
| mainBranch | No | Name of the project’s main branch | - | master |
| newCodeDefinitionType | No | Method for defining “new code” | PREVIOUS_VERSION, NUMBER_OF_DAYS, REFERENCE_BRANCH | - |
| newCodeDefinitionValue | No | Value for the “new code” definition (e.g., number of days, if the type is NUMBER_OF_DAYS) | - | - |
| visibility | No | Project visibility | private, public | private |