Skip to content

Commit c229c87

Browse files
committed
ci: enforce drizzle _query on every PR
Adds a 'Drizzle _query enforcement' step to the lint job that runs `pnpm drizzle:query-check`. The oxlint rule already blocks the common cases (db / ctx.db / this.db / tx / trx); the ts-morph verifier catches the type-aware long tail so a renamed drizzle db can't sneak past. Both exit non-zero on a fresh `.query` — verified by injecting a canary.
1 parent 0324408 commit c229c87

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ jobs:
128128
- name: Lint
129129
run: scripts/lint-all.sh
130130

131+
- name: Drizzle _query enforcement
132+
run: pnpm run drizzle:query-check
133+
131134
format-check:
132135
needs: changes
133136
runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }}

scripts/drizzle-query-rename.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ console.log(`[drizzle-query-rename] total: ${hits.length} hit(s) in ${byFile.siz
173173

174174
if (CHECK) {
175175
console.error(
176-
'[drizzle-query-rename] failing: use `pnpm drizzle:rename` or `oxlint --fix` to migrate.'
176+
'[drizzle-query-rename] failing: use `pnpm drizzle:query-rename` or `oxlint --fix` to migrate.'
177177
);
178178
process.exit(1);
179179
}

0 commit comments

Comments
 (0)