All Collections
Compare and deploy metadata
Version control
Advanced Source Control Features
Using the Salesforce code analyzer official GitHub action with Gearset
Using the Salesforce code analyzer official GitHub action with Gearset

Add Salesforce code analyzer to your Gearset pipeline via GitHub, identify problems in code sooner and continuously enforce code quality.

Claudia McPhail avatar
Written by Claudia McPhail
Updated today

Salesforce has released (as of spring 2024) their official GitHub action on the GitHub marketplace. This doc contains instructions for integrating that action into your Salesforce DevOps Pipeline, and using in conjunction with Gearset as a status check.

Note: this only applies to users who are using GitHub as their version control provider. Find out more about Gearset Pipelines and how to set up your integration with GitHub.

Before you start

Check that you have this action.yml file in your repository.
โ€‹

Setting up the GitHub action

Navigate to this page in the GitHub marketplace, and and copy the example usage.

Navigate to your repository.

In the .github/workflows/ folder create a new file and paste this example output from GitHub.

Commit your changes via a PR.

Sync the new action with the rest of your Pipeline

Using the sync PR button in Gearset make sure that the file you've added to the main branch is present in the other environments.

More detail on that feature can be found here.

Testing the new GitHub action

After setting up the files and syncing the branches it's time to test your new action.

Open a new feature branch, commit a piece of code to the branch, and open a pull request (more detail on this process can be found here).

At the point of the pull request being opened the action will be triggered, and surfaced in Gearset as a status check on that pull request.

Click 'Details' next to the run results to find the results summary in GitHub.

Did this answer your question?