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.
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 APIcapabilities. 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 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-reviewswith 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:
Reads every changed
.sqland.ymlfileFetches the linked Linear ticket and checks the PR delivers what was asked for
Verifies test coverage on new or modified models
Checks documentation completeness in schema YAML
Flags any breaking-change risk for downstream consumers
Posts one structured review to the PR's Slack thread
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.
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 diffExtracting 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.
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.
Related Docs
Last updated
Was this helpful?
