Search Composal documentation

Search public documentation, commands, and release notes.

PR Comments

Read preview links from bot comments, found for you or set with a simple address rule.

Contents

Choose this when a deployment bot posts the preview link in a PR comment. This works with new comments and edits to an existing bot comment.

Start on Verify → your project → PR Testing. You need administrator access and a connected GitHub repository. If you have not configured testing yet, follow PR configuration first.

Let Composal find your previews

  1. In Who Builds Your PR Previews?, choose A Hosting Service.
  2. Composal looks through recent open and closed PRs. If the GitHub App has deployment access, it checks deployments first. Otherwise, or if it finds no deployment, it looks for a bot comment with a preview link.
  3. If it finds one, it shows something like Found Netlify previews on #142, with the bot account and an example URL. Choose Use Netlify Previews to accept it, or Choose Another Service.
  4. Continue to Turn On PR Testing.

The comment search uses GPT-6 Luna with medium reasoning to identify a ready preview and its link label. Composal builds a rule that matches that label and the bot account, accepting any HTTPS domain. This supports projects that use several custom preview domains and keeps dashboard and log links separate. It fills the settings for you; it does not change the comments or deploy your app.

The search is limited to recent PRs and a small number of comment pages. If it cannot find a clear preview link, pick a service or enter a rule yourself. If Composal cannot read GitHub, choose Look Again to retry.

Pick a known service

Choose Netlify or Cloudflare Pages to fill the usual bot account and preview address. Netlify uses netlify[bot]; Cloudflare Pages uses cloudflare-workers-and-pages[bot]. Vercel and Render report GitHub deployments instead; see GitHub Deployment.

The Cloudflare Pages setting selects the deployment-specific link rather than the production address or branch alias.

Set your own rule

Choose Other Service, then Comments a Link.

Bot Account lists the GitHub users whose links Verify may accept. Use the complete username, including [bot] for a bot. Separate several usernames with commas.

Preview Links Look Like is the preview address, with * for the part that changes. For example:

Text
https://*.storefront.pages.dev

Replace storefront with your own project name. The address must start with https://. Each * matches letters, digits, dots, hyphens, underscores, and ~ only. The link may continue with a path. If several different links match, Verify waits rather than choosing one at random. If the bot posts links for several apps, make the address specific to the app you want to test.

Use a regular expression from the API

The API also accepts a regular expression in preview_comment_pattern. The rule must select one distinct, complete HTTPS URL. For comments containing several kinds of links, a named capture can select only the preview:

Text
Preview: (?<url>https://[a-z0-9-]+\.example\.com)

That example expects text such as Preview: https://build-123.example.com.

What happens next

When an allowed author posts or updates a matching preview link, Verify checks it and wakes the waiting run. It also checks existing comments while waiting. This supplies a preview to a run; your run triggers still decide when runs start.

A comment must name the current PR commit or have been updated after the run was requested. An older comment without a commit reference waits for a fresh update. Comments that name another commit, contain conflicting commit references, or match several preview links are ignored.

Your deployment bot is responsible for posting a ready link for the correct version. Prefer a URL that belongs to one specific deployment. A generic website does not tell Verify which commit it is serving.

If the preview is not found

Check that the author matches exactly and one preview link matches the preview address. The comment must name the current commit or have been updated after this run was requested.

If no matching preview arrives within one hour, the run is blocked. Fix the setup, then request a new run.

Return to PR configuration to turn on testing, try a PR, and configure merge checks.