For the complete documentation index, see llms.txt. This page is also available as Markdown.

End-to-end PR reviewer

Automate end-to-end pull request reviews with a DinoAI agent that checks PR scope against Linear, validates dbt™ code, tests, and docs, and posts a structured verdict to Slack.

Automate your analytics engineering code reviews with a DinoAI agent that acts like a thorough senior reviewer — reading the PR diff, checking the linked Linear issue, verifying test and documentation coverage, and posting a structured verdict directly to Slack.

compass

Before You Start

Paradime

  • Your Paradime API endpoint, API key, and API secret. — You can generate under Workspce Settings → API. Make sure to have DinoAI agent API capabilities. Requires Admin access to generate API keys.

GitHub

  • Write access to the repository you want to review PRs on

  • Ability to add repository secrets and create GitHub Actions workflows

Integrations

The following must already be connected in Paradime:

  • Linear — the agent calls get_linear_issue to fetch linked tickets

  • Slack — the agent posts reviews to #pr-reviews via post_slack_message

Linear is recommended but not strictly required. If the PR description has no Linear link, the agent will note it under SCOPE and continue with the rest of the review.

What You'll Build

By the end of this guide you'll have:

  • A DinoAI agent configured to review every pull request end-to-end

  • A Python driver script that extracts PR context and triggers the agent

  • A GitHub Actions workflow that runs automatically on every PR open or update

  • A structured Slack review posted to #pr-reviews with a clear APPROVE / REQUEST_CHANGES / REJECT verdict

What the Review Looks Like

Once triggered, the agent posts a single structured message to #pr-reviews in Slack:

The agent always cites the file and line number for every issue it raises. It will never return APPROVE if either TESTS or DOCS is FAIL.

How It Works

When a PR is opened or updated, GitHub Actions runs a Python script that collects the PR title, description, changed files, and any linked Linear issue. That context is handed to the DinoAI agent in a single trigger message. The agent then:

  1. Reads every changed .sql and .yml file

  2. Fetches the linked Linear ticket and checks the PR delivers what was asked for

  3. Verifies test coverage on new or modified models

  4. Checks documentation completeness in schema YAML

  5. Flags any breaking-change risk for downstream consumers

  6. Posts one structured review to the PR's Slack thread

1

Create the Agent YAML

Create the following file in your repository at .dinoai/agents/pr-reviewer-e2e.yml. This defines the agent's role, goal, tools, and Slack output channel.

The tools.mode: allowlist setting means the agent can only use the tools explicitly listed. This keeps the agent focused and prevents unintended actions.

The Slack channel is set to #pr-reviews by default. Update the slack.channel value if your team uses a different channel before committing this file.

2

Create the Driver Script

Create the Python script at scripts/pr_review_e2e.py. This script runs inside GitHub Actions and is responsible for:

  • Reading the PR event payload from GitHub

  • Collecting the list of changed files via git diff

  • Extracting any linked Linear issue ID from the PR description

  • Assembling a trigger message and handing it to the DinoAI agent

The script posts the DinoAI session ID back to the PR as a comment so your team can track the review. Remove step 5 if you prefer Slack-only updates.

3

Add Your Paradime Credentials to GitHub Secrets

The driver script authenticates with Paradime using three values. Add the following as GitHub Actions secrets in your repository under Settings → Secrets and variables → Actions:

  • PARADIME_API_KEY

  • PARADIME_API_SECRET

  • PARADIME_API_ENDPOINT

4

Create the GitHub Actions Workflow

Create the workflow file at .github/workflows/pr-reviewer-e2e.yml. This triggers the driver script automatically whenever a PR is opened, updated, or marked as ready for review.

Optional: Block the Workflow on a REJECT Verdict

By default the workflow fires and forgets. If you want the GitHub Actions job to fail when the agent rejects the PR, replace trigger_run with trigger_run_and_wait in the driver script:

timeout=1800 allows the agent up to 30 minutes to complete its review. The GitHub Actions workflow has a matching timeout-minutes: 35 to account for startup overhead.

Last updated

Was this helpful?