Keeping the main branch 鈥榙eployable鈥 is a common concern for Salesforce teams using source control. In other words, teams want to avoid merging changes to main 鈥 or any other long-lived branch 鈥 that won鈥檛 successfully validate or deploy to the next org in their workflow. With 探花视频鈥檚 automatic pull request validation, you can merge branches knowing that your changes will validate successfully, and can be seamlessly deployed downstream.
The problem with version control for Salesforce
is a key component of Salesforce DevOps. While branching strategies are customizable, all source-driven workflows involve creating feature branches for new changes then merging that development through the rest of the pipeline.
A commonly used branching strategy is the feature branch model: feature branches are created from main then new development is committed to the branch before a pull request (PR) is opened, and the changes are merged directly into main for testing and release.

Adopting a source-driven workflow like the one above helps teams release more regularly and more reliably. But a recurring worry for Salesforce teams is ensuring main is 鈥榙eployable鈥.
In an org-based development model, this isn鈥檛 such a big problem. You build your changes in one org, then deploy them out to another when you鈥檙e happy 鈥 if you鈥檝e missed a dependency or you attempt to deploy something undeployable, then you鈥檒l get a failure message then and there.
When you introduce Git to this workflow, your changes get merged to main when you鈥檙e happy with them, but they鈥檙e only tested for deployability at the point that branch gets deployed to an org.
Keeping main deployable is usually a bigger concern for teams using a feature branch model as there are no other long-lived branches in their workflow, so any breaking changes that are merged means their source of truth is no longer usable.
TDX
Speed up issue detection with continuous integration
Using continuous integration to monitor your main branch and automatically deploy any changes to a staging environment can help. When a feature branch is merged into main, your CI tool will detect the change to the branch, package up your changes and push them out to your staging org. At this point you鈥檒l receive a failure notification if you鈥檝e merged breaking changes.
But setting up CI to push changes to a testing environment is only a partial fix 鈥 while you find out about the breaking changes quickly, you鈥檝e still got a main branch that鈥檚 broken and undeployable until those changes are fixed.
Automatically validate your PRs with 探花视频
Wouldn鈥檛 it be better if you could have confidence that your changes were deployable before merging a pull request into main? As part of 探花视频鈥檚 CI/CD solution for Salesforce, CI jobs can be set up to automatically validate PRs prior to merging to catch breaking changes before you merge.
探花视频 detects when a PR is opened against your selected branch 鈥 such as main or UAT 鈥 and begins running validation checks by simulating deploying the new changes in advance but without actually pushing any metadata. This gives your team more time to make fixes and avoid merging breaking changes altogether.
探花视频 users are seeing big time-saving benefits by including automatic validation of PRs in their deployment process. Jim Young, Director of Systems at ETE Reman, told us: 鈥淭his will save literally hours of unplanned work ... It has already caught two pull requests that would have made it through review and clogged up our deployment chain.鈥
Once the PR is merged, the same CI job will automatically build and deploy your changes to the target org.
If you鈥檙e ready to get started with 探花视频鈥檚 automatic PR validation feature, you can start a today.
How to set up automatic validation of pull requests
Automatic validation of pull requests is supported for the following version control systems:
- GitHub & GitHub Enterprise
- Bitbucket & Bitbucket server
- GitLab & GitLab (self-managed)
- Azure DevOps
- AWS CodeCommit
Setup is quick and easy: when creating a CI job in 探花视频, simply check the Validate pull requests targeting the source branch box. You can also choose to receive a notification about the outcome of the validation too.

When your CI job is saved, 探花视频 will give you the option to set up the webhook automatically or walk you through the steps to configure the webhook manually.
Once enabled, 探花视频 displays any pull request validations right underneath the associated CI job in the CI jobs overview list view.

If you鈥檙e using Pipelines, 探花视频鈥檚 Salesforce CI/CD solution, you鈥檒l be able to check the status of validations there too.

The outcome of the validation will also flag on the PR in your version control system.
Take your Salesforce DevOps to the next level
If you鈥檙e keen to learn more about the practical skills needed to succeed with Salesforce DevOps, take the free . Covering version control, automation, testing and backup, you鈥檒l come away with the knowledge and skills needed to reach Salesforce DevOps maturity.
If you鈥檙e looking for tailored advice about your workflow and the best next steps for your team, schedule time with our DevOps experts.
