You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cloud/features/ci.mdx
+23-15Lines changed: 23 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,28 +5,36 @@ sidebarTitle: "PR / MR Review"
5
5
6
6
Every time a developer changes a dbt model, there's a question no one can easily answer before merging: _is this safe to ship?_
7
7
8
-
Elementary's PR / MR Review answers that question automatically. When a pull request touches your dbt models, a comment appears with everything your team needs to review the data quality impact — test results, active incidents, and downstream blast radius — without leaving the PR.
8
+
Your dbt tests tell you if the code compiles. They don't tell you if the model you just refactored has been failing tests for the past week, whether it feeds a dashboard your CEO looks at every morning, or whether there's already an open incident on it that your data team is investigating.
9
9
10
-

10
+
Elementary's PR / MR Review answers all of that automatically. The moment a pull request touches your dbt models, a structured comment appears with everything your team needs to make a confident merge decision — without leaving the PR.
Data quality issues are exponentially cheaper to catch before merge than after. But today, most teams have no visibility into data health at review time — reviewers check the SQL, not the data. By the time a broken model hits production, it's already in dashboards, downstream models, and stakeholder reports.
17
+
18
+
Elementary closes that gap by bringing live data quality context directly into the code review workflow.
11
19
12
20
## What you get on every PR
13
21
14
-
-**Test history** — pass/fail counts for each changed model over the last 7 days
15
-
-**Active incidents** — any open data quality issues affecting those models right now
16
-
-**Downstream impact** — which models, pipelines, and dashboards depend on what you're changing
17
-
-**Health summary** — a clear signal on whether it's safe to merge
22
+
-**Test history** — pass/fail counts for each changed model over the last 7 days, so reviewers know if they're touching something that's already fragile
23
+
-**Active incidents** — any open data quality issues on those models right now, before the change lands on top of them
24
+
-**Downstream blast radius** — exactly which models, pipelines, and dashboards depend on what's changing, two levels deep
25
+
-**Health summary** — a plain-language signal on whether it's safe to merge, powered by Claude
18
26
19
-
The comment updates automatically on every new push, so the review stays current without cluttering the PR thread.
27
+
The comment updates automatically on every new push, so the review always reflects the latest state. No noise, no duplicate comments.
20
28
21
29
## How it works
22
30
23
-
The review is powered by [Claude](https://www.anthropic.com) connected to the [Elementary MCP server](/cloud/mcp/intro). When a PR is opened:
31
+
The review is powered by [Claude](https://www.anthropic.com) connected to the [Elementary MCP server](/cloud/mcp/intro). When a PR is opened or updated:
24
32
25
33
1. A CI job detects which models changed using `git diff`
26
-
2. Claude queries Elementary for live data quality context on those models
27
-
3. A formatted summary is posted as a comment on the PR or MR
34
+
2. Claude queries Elementary for live data quality context on those exact models
35
+
3. A structured Markdown summary is posted as a comment on the PR or MR
28
36
29
-
No custom scripts, no webhook setup, no infrastructure to manage.
37
+
No custom scripts. No webhook setup. No infrastructure to manage. Two secrets and one file.
30
38
31
39
## Setup
32
40
@@ -84,7 +92,7 @@ That's it. Open a PR that touches a model file and the review comment appears au
84
92
|---|---|---|
85
93
| `models-path` | `models/` | Path to your dbt models directory |
| `claude-model` | `claude-haiku-4-5-20251001` | Claude model to use. Switch to `claude-sonnet-4-6` for deeper analysis |
95
+
| `claude-model` | `claude-haiku-4-5-20251001` | Claude model to use. Switch to `claude-sonnet-4-6` for deeper analysis on complex changes |
88
96
| `base-ref` | PR base branch | Branch to diff against |
89
97
90
98
```yaml
@@ -122,16 +130,16 @@ Open an MR that touches a model file and the review comment appears automaticall
122
130
123
131
**No comment appears after the job runs**
124
132
125
-
For GitHub, make sure `pull-requests: write` is set under `permissions` in the workflow. GitHub Actions requires this to post PR comments.
133
+
For GitHub, make sure `pull-requests: write` is set under `permissions` in the workflow file. GitHub Actions requires this explicitly to post PR comments.
126
134
127
135
**`git diff` returns no changed models**
128
136
129
-
Make sure `fetch-depth: 0` is set on the checkout step. Without full git history the runner cannot compare branches.
137
+
Make sure `fetch-depth: 0` is set on the checkout step. Without full git history the runner cannot compare branches and the diff will be empty.
130
138
131
139
**The comment says the MCP server is unreachable**
132
140
133
141
Verify `ELEMENTARY_API_KEY` is correctly set and the MCP server is enabled for your account. See the [MCP setup guide](/cloud/mcp/setup-guide).
134
142
135
143
<Warning>
136
-
If a model has never been synced through Elementary, the comment will note that no history is available yet. Results appear automatically after the next Elementary sync.
144
+
If a model has never been synced through Elementary, the comment will note that no history is available yet. Results populate automatically after the next Elementary sync.
0 commit comments