Skip to main content
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.com through the GitHub App, and GitLab and Bitbucket Cloud through webhooks. Use a service account to separate Automation activity from human work.

Configuration

Pull request trigger configuration

Event source

Pull request triggers need an event source that delivers PR events from your Git provider to Ona. There are two options:
SourceWhen to use
GitHubYou use GitHub.com and have the GitHub integration enabled. No extra setup is required. Ona receives PR events through the App.
WebhookYou use GitLab or Bitbucket Cloud, or you prefer not to enable the GitHub integration. You create a webhook in Ona and register it in your Git provider.

GitHub

If your organization has the GitHub integration enabled, select GitHub as the event source. Ona receives PR events directly through the App.

Webhook

If your organization has 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

EventWhen it fires
OpenedNew PR created
UpdatedNew commits pushed
Ready for reviewDraft marked ready
Review requestedReviewer assigned for review
ApprovedReviewer approves
MergedPR merged
ClosedPR closed without merge
Common combinations: Opened + Updated (check every change), Ready for review (analysis before human review), Approved (final validation)

Next steps