Skip to content

Docs for TrueQuery 0.1.6View as Markdown

GitHub Action

Run TrueQuery on pull requests and pushes with the composite action in this repository. By default it runs truequery review and writes the findings and the TrueQuery receipt to the job summary ($GITHUB_STEP_SUMMARY), with no special token permissions required:

name: truequery
on: [push, pull_request]

permissions:
  contents: read

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: Analytically-ai/truequery@v0.1.6
        with:
          path: .

Inputs#

InputDefaultDescription
path.Space-separated files or folders to check
commandreviewreview (findings plus the receipt) or detect (findings only)
fail-onerrorLowest severity that fails the job (error, warning, or advisory)
dialect""SQL dialect override (e.g. postgres, bigquery, snowflake, duckdb, tsql); uses DATA.md or auto-detection when empty
mode""Mode override (explore, build, change, or assure)
allow-unverifiedfalseSet to true to exit 0 when some files could not be checked (turns exit code 3 into 0)
sarif-file""Optional path to write a SARIF 2.1.0 report for GitHub Code Scanning
summarytrueWrite the findings and receipt to $GITHUB_STEP_SUMMARY

Uploading SARIF to GitHub Code Scanning#

      - uses: Analytically-ai/truequery@v0.1.6
        id: truequery
        continue-on-error: true
        with:
          path: models/
          sarif-file: truequery.sarif

      - uses: github/codeql-action/upload-sarif@v3
        if: always()
        with:
          sarif_file: truequery.sarif