To start a 30-day Code Reviews trial in Gearset, open the Code reviews page, click Get Started, and scan your first repository. Code Reviews then scans your repository branches for technical debt and can review your pull requests (PRs) automatically.
Use these steps to start the trial, connect a Git repository, and find the Code Reviews settings and rules. The screenshots use a GitLab repository as the example.
Note: Only team owners can start a Code Reviews trial and scan a new repository. If you're a team member, ask a team owner to follow these steps.
What do I need before I start a Code Reviews trial?
Before you start a Code Reviews trial, check these four things:
You're a team owner on your Gearset team.
Your team has a team-shared source control connection for your Git provider, if you use Bitbucket, GitHub, or GitLab.
The account behind that connection has admin permission on the repository. Code Reviews needs this permission to create the webhook that triggers PR reviews.
The branch you want to scan already contains your Salesforce metadata. A first scan of an empty branch finds no issues.
What if my Git provider isn't connected?
If your team has no team-shared connection for the provider you select, Code Reviews shows this message, and Start scanning stays unavailable:
There is no team-shared GitLab account set up for your team yet. Team owners can do this from the Manage source control page, in the Team-shared source control and services section.
To fix this, add the team-shared connection as a team owner. See Team-shared source control connections for the steps. Then go back to the Code reviews page and click Get Started again.
How do I start the Code Reviews trial and scan a repository?
To start the Code Reviews trial and scan your first repository, follow these steps as a team owner.
In the left-hand menu, click
Code reviews.Click
Get Started. Below the button, Gearset shows Enabling Code Reviews will start a 30 day trial.In the
Scan new repositorywindow, selectRepository. This option runs tech debt scans on your repository branches and automated code reviews on your PRs.Select your provider from the
Git providerdropdown. AConnectedlabel shows next to each provider that has a team-shared connection.Select the repository you want to scan. Use
Search repositoriesto find it in a long list.Click
Start scanning.
For Azure DevOps, Gearset sends you to Azure DevOps to authorize the connection. When you return to Code Reviews, select your repository and click Start scanning.
For a self-hosted Git provider, Gearset has to set up a connector for your team before you can connect. Contact our support team to start this.
Code Reviews doesn't support AWS CodeCommit repositories.
How do I scan a Salesforce org with Code Reviews?
To run a Code Reviews tech debt scan on a Salesforce org, connect the org to Code Reviews directly. Code Reviews needs its own connection to the org, even if the org is already connected to Gearset.
When Code Reviews asks what to scan, choose the Salesforce org option instead of a repository.
Enter a name for the org. You can use any name, as long as it's unique.
Click
Connect. A new page opens.Select the org type: sandbox or production.
Select the login URL:
Default (test.salesforce.com)orCustom (use My Domain).Log in to the org and authorize the connection.
Before you log in, Gearset shows this reminder: If the Gearset Deploy app hasn’t yet been installed as a connected app adding new org connections may fail. To install the app, see How to install the Gearset Connected Apps.
What happens after I click Start scanning?
Code Reviews sets up a code review environment for the repository, then runs the first scan. The scan can take a while. The time depends on the size and complexity of the repository.
When the scan completes, the Code Reviews results show across the Priorities, Issues, Files, and Pull requests tabs. See Branch health scans in Gearset for a full explanation of each tab and of the scan results.
How do I change the Code Reviews settings for my repository?
Every repository you connect to Code Reviews has its own Settings page. Only team owners can open it.
To open the Code Reviews Settings page, click Code reviews, click Issues, and select your repository. Then click the three-dot menu next to the repository selector, and click Settings.
See Code Reviews repository settings for more detail.
What are Code Reviews rules, and why edit them?
A Code Reviews rule is one check that Code Reviews runs against your code. Each rule has a severity: Critical, Error, or Warning.
From the Rules tab on the repository Settings page, you can turn a rule on or off, and change its severity. You might turn off a rule that doesn't apply to your team, or change a severity to match how serious the issue is for your team.
See How to edit Code Reviews rules in Gearset for the steps.
Troubleshooting Code Reviews trial setup
Why can't I click Get Started on the Code Reviews page?
Only team owners can start a Code Reviews trial. For team members, Gearset hides or disables Get Started. Ask a team owner to start the trial.
Why did the first Code Reviews scan find no issues?
A first Code Reviews scan finds no issues when the scanned branch has no Salesforce metadata in it. Check that the branch contains your metadata. Then run a new scan from the Priorities tab.
Why don't Code Reviews PR reviews start?
Code Reviews needs a webhook on your repository to know when a PR opens or updates. Check these three things on the Code Reviews repository Settings page:
On the
Configurationtab, a webhook is set up. If it isn't, clickCreate webhook.On the
Configurationtab,Enable Automated Code Reviews on PRs in tracked branchesis turned on.On the
Tracked Branchestab, the PR's destination branch is in the list.
Why does Gearset say webhooks are not supported for my repository?
For a GitHub repository, Gearset shows Webhooks are not supported for this project's version control provider when the account behind your connection has no admin permission on the repository. Give that account admin permission on the repository. Then click Create webhook again.




