Skip to content

[Improvement]: Option to require maintainer approval before preview deployments #6546

@andrasbacsai

Description

@andrasbacsai

Discussed in #6508

Originally posted by TheDanniCraft August 31, 2025
Currently, preview deployments are triggered automatically for all pull requests.
This can be a security concern when non-maintainers open PRs, since preview builds may expose environment variables (e.g., if a contributor intentionally outputs process.env values on a api route).

Proposed behavior:

  • If a maintainer opens a PR → preview deployment runs automatically.
  • If a non-maintainer opens a PR → preview deployment is paused until a maintainer explicitly approves it.

This would help prevent accidental or malicious exposure of sensitive data while still keeping previews convenient for trusted maintainers.

Use case example:

  1. External contributor opens a PR.
  2. The code contains logic that dumps environment variables.
  3. Without approval gating, a preview deployment would run and expose those variables.
  4. With approval gating, the deployment is paused until a maintainer reviews and approves it.

This feature would add a valuable layer of security for projects that rely on preview deployments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions