Long living branches cannot be enabled on sonarcloud

  • Using GitHub
  • Currently does not use CI system
  • Languages of the repository is Python
  • The SonarCloud project is public, the URL is https://github.com/dodo5522/test-sonar
  • Problem is: I cannot set any branch as “Long Living Branches” on https://sonarcloud.io/project/branches?id=dodo5522_test-sonar
  • Steps to reproduce
    1. Set Long living branches pattern as .*develop.* on sonarcloud

    2. Create new branch develop3 based on master in git repository working copy on my local machine

    3. Push the new branch develop3 to remote git repository

    4. Create new branch feature/id/1/master based on develop3 , add some change to source code on the branch, and push it to remote repository

    5. Run the below command on the working copy on my local machine

       sonar-scanner -Dsonar.login=${MYTOKEN} -Dsonar.host.url=https://sonarcloud.io -Dsonar.projectKey=dodo5522_test-sonar -Dsonar.organization=dodo5522 -Dsonar.sources=. -Dsonar.pullrequest.base=develop3 -Dsonar.pullrequest.key=5 -Dsonar.pullrequest.branch=feature/id/1/master
    6. develop3 does not exist on my sonarcloud project like below figure and feature/id/1/master branch seems to be based on master that should be based on develop3

    7. Try to set Long living branches pattern as .* on sonarcloud like below figure and try to do similar procedure 1.~5. but has same problem.

Sorry, I could solve this issue. I need to register branch name and target according to your help https://sonarcloud.io/documentation/branches/overview/ . Thanks.