Auto-generate Previews

We love automatically generating Previews from new pull requests - we think it’s one of Tugboat’s best features! Build Pull Requests Automatically kicks off a new Preview build whenever a pull request is opened in your linked git repository.

If you’re using a Base Preview, the automated Preview build starts from that Base Preview. When building previews from pull requests, Tugboat will locally merge the pull request into its destination branch, and build from the merged result.

When you enable this functionality, Tugboat does not automatically build pull requests from forked repositories. That requires you to set an additional option: Build Previews for Forked Pull Requests. Any secrets in your Preview will be accessible by the owner of the forked repository, so this setting is turned off by default. Automated Preview Build requests from forked repositories appear as failed Preview builds in your Tugboat Dashboard. For more info, see: Troubleshooting -> Tugboat Error Messages 1074.

To set Tugboat to automatically Build Previews

To configure Tugboat to auto-generate Previews, you’ll need to:

  1. Go to username -> My Projects at the upper-right of the Tugboat screen.
  2. Select the project where you want to configure auto-generate settings for Previews.
  3. Click into Settings for the repository.
  4. Click the checkboxes for the auto-generate features you’d like to turn on/off.
  5. Press the Save Configuration button to save your changes.

Don’t see the options to auto-generate Previews from pull requests? You’ll need to connect your preferred git provider to Tugboat, and then delete and re-add the provider-specific version of the repository to your Tugboat project.

Visual Walkthrough

To Build a Preview with Conflicts

Sometimes you may want to build a preview in a pull request, even if it has conflicts with the destination branch. To build the preview without first merging, delete the automatically created preview and then Build a Preview from the branch instead of the pull request.