Customizing PR Comments

You can customize a Squash PR comment to list different applications, subdomains and URL arguments.

Listing Multiple Applications

See this page for more details on repos with multiple applications.

Listing Subdomains

Squash has built-in support for subdomains and  multi-level subdomains.

Here is a .squash.yml example (refer to this page for more information on the Squash YAML file) showing how to define multiple subdomains to appear in a PR comment. Note the “subdomains” field, we list groups within this field, each group can have multiple subdomains.

deployments:
  CRM:
    filename:
      ./src/CRM/docker-compose.yml
    context_path:
      ./src
    vm_size:
      2GB
    subdomains:
      Calendar App:
        - calendar
      Customer Demo Apps:
        - acme-books
        - acme-surf
    ready_wait:
      # This will tell Squash to wait up to 20 min (1200 seconds) for a
      # success response from the app. The count down only starts after
      # the build process is finished.
      1200

And the Squash PR comment will look like this:

Some important notes regarding the PR comment above:

  • Squash by default will always post a link for the root endpoint, without any subdomains (you can change this behavior with “default_pr_comment: false”). This is represented by this line:

  • Since each Squash URL has the same unique identifier (1fx4b) then each will run off the same virtual machine. This is because in the Squash YAML file posted above we have only one app/deployment, which is the CRM app.

Listing URL arguments

Squash also supports adding default URL arguments to the PR comments. Example YAML file

deployments:
  CRM:
    filename:
      ./src/CRM/docker-compose.yml
    context_path:
      ./src
    vm_size:
      2GB
    subdomains:
      Calendar App:
        - calendar,/?que=99764QQ
      Customer Demo Apps:
        - acme-books,/search
        - acme-surf
    ready_wait:
      # This will tell Squash to wait up to 20 min (1200 seconds) for a
      # success response from the app. The count down only starts after
      # the build process is finished.
      1200

And this is how the PR comment will look like: