Git integration

Connect your git host once. PreviewDrop handles webhooks, PR comments, and cleanup for you.

Supported providers

  • GitHub (cloud) — via the PreviewDrop GitHub App. Public and private repos.
  • GitLab.com — via OAuth. Public and private projects, nested groups included. Self-hosted GitLab is available on Enterprise plans by arrangement.
  • Bitbucket Cloud — via OAuth. Public and private repositories.
One connection per workspace
Each provider is connected once, from Settings → Integrations, by the workspace owner or an admin. Every team member then imports repositories through that connection. GitHub Enterprise Server and Bitbucket Data Center are not supported.

Connecting GitHub

  1. Click Connect repo in the dashboard and choose GitHub.
  2. Install the PreviewDrop GitHub App on your personal account or an org you admin.
  3. Grant access to specific repos (recommended) or all repos. You can change this later in your GitHub settings.
  4. You'll be redirected back. The repos you picked show up in the repo chooser.
What the GitHub App can do
Read metadata, receive push and pull-request events, post comments on PRs, set commit status checks. It cannot push code, open PRs on your behalf, or modify repo settings.

Connecting GitLab or Bitbucket

  1. Open Settings → Integrations and click Connect GitLab or Connect Bitbucket.
  2. Authorise PreviewDrop on the provider. You are sent straight back to the dashboard.
  3. Click Connect repo, pick the provider tab, choose a repository and a branch.
  4. PreviewDrop stores a webhook secret that belongs to this project only and, when it may, registers the webhook on that repository.
GitLab: read-only by default
Connecting GitLab asks only for read_api and read_repository — list projects and branches, clone, build. Nothing can be written to your GitLab. Because GitLab has no narrower write scope, creating the webhook and commenting on merge requests need its api scope; that is a separate, optional Enable automation step in Settings → Integrations. Without it, add the webhook yourself from the project's Settings tab (payload URL, secret and triggers are shown there) and previews still build on every push and merge request — they just are not announced on the MR.
If the webhook could not be installed automatically
Creating a webhook needs automation enabled (GitLab) plus Maintainer rights on GitLab or Adminrights on Bitbucket. When either is missing the project is still created; the project's Settingstab shows the payload URL, the secret and the triggers to add by hand, plus a button to retry once you have them.

Access tokens are stored encrypted per workspace and refreshed automatically. Disconnecting a provider fromSettings → Integrations stops future deploys for its projects; running previews are unaffected.

What triggers a deploy

Once a repo is connected, PreviewDrop deploys automatically on:

  • Push to any branch — new commit → new deployment on the same branch subdomain.
  • Pull / merge request opened — fires a deploy and (if enabled) posts the URL as a PR or MR comment.
  • Pull / merge request updated — a new push on the source branch → new deployment.
  • Branch deleted or PR / MR merged or closed — the preview is stopped and scheduled for teardown.
Want to skip deploys for a specific commit? Add [skip preview] anywhere in the commit message.

PR comments

Turn on Post preview URL to PRs in Project Settings and PreviewDrop will add a comment to each PR the moment the preview is live:

PR comment
🚀 Preview ready | Branch | URL | Status | |--------|------------------------------------------|--------| | feature/checkout-v2 | https://feature-checkout-v2-abc.previews.previewdrop.dev | ready (34s build) | Built from commit a1b2c3d. Comment will update on each new push.

The comment is idempotent — each new push edits the same comment instead of spamming threads.

Commit status checks

PreviewDrop sets a commit status so the green checkmark in your PR list is a real signal: it means the preview built and is reachable. If the build fails, the check fails with a link to the build log.

Monorepos

For repos with multiple deployable services, create one PreviewDrop project per service and set the Root directory for each. PreviewDrop will only rebuild a service when files inside its root directory (or a shared path you configure) change.

Project Settings
Service: web Root: apps/web Trigger on: apps/web/** | packages/shared/** Service: api Root: apps/api Trigger on: apps/api/** | packages/shared/**

Disconnecting

Removing the provider integration stops all future deploys immediately. Existing previews keep running until their TTL expires — or you can stop them manually from the Deployments tab.