Understanding branches for Salesforce project
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

Understanding branches for Salesforce project

  • Dark
    Light

When creating an analysis project from Salesforce, the org or sandbox you authorize when creating the project will become your main branch. You can add your sandboxes as an analysis project as branches by editing your project (from the Project Analysis page). This allows for easy comparison between the production orgs or sandboxes and is especially good for checking features before production.

  1. Select your Salesforce project from the My Projects screen.
  2. Go to the More tab and select Project Analysis from the dropdown.
    image.png
  3. Click on Edit Project.
    image.png
  4. Click on image.png button to add a new branch.
    image.png
  5. Assign a name to your branch and choose the branch type:
    • Comparison Branch- This branch determines only the recent issues in a project branch based on comparing with the standard branch in your project.
    • Standard Branch- This branch will have entire history and dashboards for your project.
      image.png
  6. Select your Salesforce environment.
  7. Once you click on Authorize, it will redirect to the Salesforce login page to validate your credentials.
  8. This triggers the project analysis and the project being added under your CodeScan organization.
  9. You'll be redirected to the Project Analysis screen, where you can view the status of your analysis triggered.
    image.png

Managing branches

On your Project Analysis page, go to Project Setting > Branches.
image.png

On this page, you can:

  • View the branches you have created to date and segregated into master branches (including standalone branches) and comparisons branches in two different tabs.
  • Delete all the branches except the main branch.
  • Renaming of the branch applies only to the main branch.

Delete a branch

For example, to delete a comparison branch, navigate to the Comparisons Branches tab, click on image.png icon and click on Delete Comparison Branch. This process cannot be undone.
image.png

Rename the main branch

To update the name of the main branch, navigate to the Branches tab, and look for the main branch.
Click on image.png icon under the Actions tab and click on the Rename branch.
image.png

Give the main branch a new name and click on Rename.

Comparing Branches

image.png

  1. Select your Salesforce project from the My Projects page.
  2. When you click on the main branch dropdown for your project, you can see the list of all branches that you have created or added.
  3. If there are any violations for your branch, such details will appear. If you click on a branch, the details of the violations can be seen on the Quality Gate Status screen.
Important Note:

All new branches added in this way will be deleted in 30 days if they are not analyzed again.

If you have any further questions about CodeScan Cloud, please contact us.


Was this article helpful?