This feature allows users to initiate deployments directly from a pull request in their Git repository, supporting several use cases, for example:
Salesforce environments: If your configuration is maintained in an SFDX project format, you can create a Salto deployment directly from an SFDX pull request. This process can be facilitated using VS Code and the SFDX CLI to generate the pull request. For detailed instructions on enabling SFDX integration for your Salesforce environments, please refer to this guide.
Advanced "Find and Replace" operations: Replace values across multiple files or introduce a large number of new elements generated by internal scripts.
To use this feature, ensure your environment is connected to a Git branch and that deployment protection with pull requests is enabled.
For step-by-step instructions on connecting a Salto environment to a Git branch, refer to our guide: Connecting an Environment to a Git Branch.
To learn how to enable deployment protection with pull requests, visit this article: Protecting Deployments with Pull Requests.
Once you have a pull request targeting the environment branch that contains the configuration changes you would like to deploy, head over to the "Compare & Deploy" tab located in the top navigation bar. Here, you'll find all deployment activities, including those being prepared, currently in progress, or previously completed.
Click on the dropdown arrow beside "Compare & Deploy", switch the selection to “Deploy from pull request”, and then click on it to proceed.
A dropdown menu displaying all open pull requests targeting the branch linked to the environment will be shown. Choose a pull request and click the "Create Deployment" button to produce a deployment preview highlighting the changes within the selected pull request.