> ## Documentation Index
> Fetch the complete documentation index at: https://ona.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Pull request triggers

> Trigger Automations from pull request events

<Note>Available on the Enterprise plan. [Contact sales](https://ona.com/contact/sales) to learn more.</Note>

Pull request triggers run Automations when PR events occur: code changes, reviews, merges. Use them for automated code review, security scanning, documentation updates, and compliance checks. They support **GitHub**, **GitLab**, and **Bitbucket Cloud**. Use a [service account](/ona/organizations/service-accounts) to separate Automation activity from human work.

## Configuration

<img src="https://mintcdn.com/gitpod-13c83c2b/xk3kxfJmgKP2B21t/images/automations/edit-trigger-pullrequest.png?fit=max&auto=format&n=xk3kxfJmgKP2B21t&q=85&s=eabfce39bccc51e6de9e21a2e72be2ee" alt="Pull request trigger configuration" width="1298" height="1462" data-path="images/automations/edit-trigger-pullrequest.png" />

### Event source

Pull request triggers need an event source that delivers PR events from your Git provider to Ona. There are two options:

| Source                                               | When to use                                                                                                                                              |
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **[GitHub App](/ona/integrations/configure-github)** | You use GitHub.com and have the [Ona GitHub App](/ona/integrations/configure-github) installed. No extra setup — Ona receives PR events through the App. |
| **[Webhook](/ona/automations/webhooks)**             | You use GitLab or Bitbucket Cloud, or you prefer not to install the GitHub App. You create a webhook in Ona and register it in your Git provider.        |

#### GitHub App

If your organization has the [Ona GitHub App](/ona/integrations/configure-github) installed, select **GitHub App** as the event source. Ona receives PR events directly through the App.

#### Webhook

If your organization has [webhooks](/ona/automations/webhooks) configured, a dropdown appears instead, letting you select an existing webhook or configure a new one.

### Runs on

* **Projects** (recommended): select projects. The Automation monitors all repositories within them.
* **Repositories**: use a search query to filter specific repositories.

### Triggers on PR

| Event            | When it fires                |
| ---------------- | ---------------------------- |
| Opened           | New PR created               |
| Updated          | New commits pushed           |
| Ready for review | Draft marked ready           |
| Review requested | Reviewer assigned for review |
| Approved         | Reviewer approves            |
| Merged           | PR merged                    |
| Closed           | PR closed without merge      |

**Common combinations:** Opened + Updated (check every change), Ready for review (analysis before human review), Approved (final validation)

## Next steps

* [GitHub App](/ona/integrations/configure-github): install the Ona GitHub App for webhook-free PR triggers
* [Webhooks](/ona/automations/webhooks): create and manage webhook endpoints
* [Run an Automation](/ona/automations/running-automations)
* [Manual triggers](/ona/automations/triggers/manual)
* [Time-based triggers](/ona/automations/triggers/timebased)
