Start FreeLog in
SonarCloud | Managing your projects | Administering your projects | Adjusting various settings

Adjusting various project settings

On this page

This page is directed at the project admin.

Defining the long-lived branch name pattern at project level

SonarCloud considers a branch to be long-lived if:

  • It is the main branch, or
  • Its name matches the long-lived branch name pattern.

All other branches are considered short-lived. 

If your project belongs to an Enterprise plan organization, its long-lived branch name pattern is by default the pattern set at the organization level. You can change it. 

The name pattern is based on a regular expression. For example, the regular expression: (branch|release)-.*  matches any name that begins with the string branch- or release-.

Changing the long-lived branch pattern of your project
  1. Retrieve the project.
  2. In the left navigation bar, select Branches.
  3. In the top-right corner, select the edit icon on the right of Long-lived branches pattern. The Detection of long-lived branches dialog opens as illustrated below (in the case of an enterprise plan organization).
  4. Enter your regular expression. 
  5. Select Save.
Resetting the long-lived branch pattern to default

If your project belongs to an Enterprise plan organization, you may want to reset the long-lived branch to the default set at the organization level. To do so:

  1. Retrieve the project.
  2. In the left navigation bar, select Branches.
  3. In the top-right corner, select the edit icon on the right of Long-lived branches pattern. The Detection of long-lived branches dialog opens.
  4. Select Reset to default.

Changing the project key

  1. Retrieve the project.
  2. In the left sidebar, select Administration > Update Key. The Update Key page opens.
  3. Enter the new key and select Update.

Changing the project's visibility

The project's visibility may be:

  • Public: Anyone, including anonymous users, can view public projects. A public project may be part of a free or paid plan organization.
  • Or private: Only authorized users, who are members of the organization, can view a private project. A private project can only be part of a paid plan organization. 

If your organization is a paid plan organization then you can change the visibility of your project provided you're a project admin. Otherwise, you must upgrade your organization to the paid plan.

To change the visibility of your project:

  1. Retrieve the project.
  2. In the left sidebar, select Administration > Permissions. The Permissions page opens.
  3. In the Project visibility section, select the Public or Private checkbox (Or you can upgrade your organization from this section.) The Turn to Private / Public dialog opens.
  4. Confirm the change.

You can add URLs associated with your project visible on your project’s Information page in the External Links section. 

Creating a project link
  1. Retrieve the project.
  2. In the left sidebar, select Administration > Links. The Links page opens.
  3. In the top right corner, select Create. The Create New Project Link dialog opens.
  4. Enter the name and URL, and select Create.
Deleting a project link
  1. Retrieve the project.
  2. In the left sidebar, select Administration > Links. The Links page opens with the list of configured links.
  3. Select the dustbin icon in the row of the link to delete.

Changing the binding of your project

You can bind a project to another repository or you can bind an unbound project to a repository.

Binding a project to another repository

You can change the repository binding of a project provided you have Administer permission on that project and Create projects permission. The following limitations apply:

  • The source and target repositories must be in the same organization.
  • A public project cannot be bound to a private repository.

To bind a project to another repository:

  1. Retrieve the project.
  2. Go to Administration > General Settings > Repository binding.
  3. In the list of repositories, select the target repository and click Save.
Binding an unbound project to a repository

You can bind an unbound project to a repository provided you have Administer permission on that project and Create project permission. Note that a public project cannot be bound to a private repository.

To bind an unbound project to a repository:

  1. Retrieve the project.
  2. Go to Administration > General Settings > Repository binding.
  3. In the list of repositories, select the repository and click Save
Updating the project binding on repository URL change

In case you renamed your repository or moved it within the same organization, you can update the repository binding to your SonarCloud project as follows:

  1. Retrieve the project.
  2. Go to Administration > General Settings > Repository binding.
  3. In the list of repositories, re-select the target repository and click Save.

Disabling the automatic analysis

If applicable, a new project's analysis method is set to automatic analysis by default. 

To disable the automatic analysis on your project:

  1. Retrieve the project.
  2. Go to Administration > Analysis method. 
  3. In Automatic Analysis, unselect Enabled for this project.

Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License