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.
Supports GitHub and GitLab only. Use a service account for PR automations to separate automation activity from human work.

Configuration

Target scope

  • Projects - Select projects; automation monitors all repositories within them
  • Repositories - Use a search query to filter specific repositories
Pull request trigger configuration

Events

EventWhen it fires
OpenedNew PR created
UpdatedNew commits pushed
Ready for reviewDraft marked ready
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)

Webhook setup

After saving your automation, configure webhooks to send events to Ona. Open your automation’s Configuration section to get the payload URL and secret. Webhook configuration details

GitHub

  1. Repository settings → WebhooksAdd webhook
  2. Enter Payload URL and Secret from Ona
  3. Set Content type to application/json
  4. Select Let me select individual events → check Pull requests
GitHub webhook docs

GitLab

  1. Repository settings → Webhooks
  2. Enter URL and Secret token from Ona
  3. Check Merge request events
GitLab webhook docs

Security

Webhooks authenticate using the secret token - GitHub/GitLab sign payloads, Ona verifies signatures. Keep your secret secure and regenerate if compromised.

Next steps