Branches allow you to keep track of changes that may affect the branch that your project is linked to. There are two types of branches:
- Long lived branches: which allow you to see the full dashboard and history of your project.
- Short lived branches: which allow you to the the delta in issues between your branch and your master/production/target.
GitHub and Bitbucket
When creating an analysis project from GitHub or Bitbucket repository in CodeScanCloud, you will be asked to choose the branch that the project is linked to. This branch will become your main branch. If you also select Check Pull requests, any changes that affect this main branch will be reflected in this project with the branch functionality.
If you have set your main branch to master, any relevant pull request will be analysed when it is created and every time it is updated. The results will be displayed in the same page as your main branch analysis under the branches drop down menu.
This topic is covered in a separate article. Click here to go to the related article.
Visual Studio Team Services (VSTS)
When a pull request is created in a VSTS repository or in a repository tracked by your VSTS Build Definition, a new branch will be created on your CodeScan cloud project. Please note that any remote repositories will need to have Continuous Integration and Pull Request Validation checked for the appropriate branches in the Build Definition’s Triggers menu.
On your Project Analysis page, go to Project Setting > Branches and Pull requests. This page allows users to delete any new branches and also change the branch that the Analysis Project is checking.
Delete Branch: To delete a branch, click the() button next to the branch and click Delete Branch.
Rename Branch: To change the branch that the Analysis Project is tracking, click the () icon next to the main branch and click Rename Branch. Enter the name of the branch you would like to begin tracking. Changes will only be reflected on the project’s Overview page once the analysis has been performed again.
Here you can see the branch has 4 new violations. If the branch is selected, the details of the violation/s can be seen. All new branches that are added in this way will be deleted in 30 days if they are not analysed again.
If you have any further questions about CodeScan Cloud, please contact us.