# Automate GitHub Issue and Pull Request Triage in dbt with Atlas in 2026

> Atlas automates dbt issue and pull request triage within GitHub workflows, integrating with `dbt test` and `sqlfmt` for safe, trusted, and efficient dbt project maintenance.

Atlas automates GitHub issue and pull request triage for dbt projects, allowing developers to safely respond to events from a GitHub workflow, but only for trusted users. It integrates directly with the dbt toolchain, enabling actions like running `dbt test` to validate changes, managing dependencies with `dbt deps (packages.yml)`, and ensuring code quality with `sqlfmt`. This ensures that automated responses are not only efficient but also adhere to strict security and code quality standards within your dbt codebase.

## Key takeaways

- Atlas automates dbt issue and pull request triage safely within GitHub Actions.
- Strict permission checks and explicit mentions secure Atlas runs on dbt code.
- Atlas understands dbt's `ref()`, `source()`, `schema.yml` tests, and materializations.
- It integrates directly with `dbt test`, `dbt deps (packages.yml)`, and `sqlfmt` for dbt-specific tasks.
- Unified diffs and a read-only plan agent ensure human oversight for all dbt code changes.
- Context overflow for large dbt pull requests is explicitly handled with clear error messages.

## How Atlas Automates dbt Triage in GitHub Workflows

In 2026, Atlas streamlines dbt project triage by integrating the `atlas github` command directly into your GitHub Actions workflows. This command acts as a secure entry point, requiring specific `MODEL` and `PROMPT` inputs to ensure that automated responses are precisely controlled and contextually relevant.

Atlas provides a first-class GitHub entrypoint through its `atlas github` command, designed to operate within a GitHub Actions environment. This command rigorously validates its inputs, refusing to run if the `MODEL` in `provider/model` form or the `PROMPT` for specific event types are missing or incorrect. For instance, if a pull request event requires a prompt and none is provided, the handler fails with 'PROMPT input is required for <event> events.' Atlas leverages its core tools like `bash`, `read`, `grep`, and `edit` to interact with the dbt codebase, allowing it to analyze `dbt_project.yml`, `models/` directories, and `schema.yml` files to understand the project's structure and dependencies. This ensures that any automated action, such as suggesting a change to a dbt model or adding a schema test, is grounded in a deep understanding of the dbt project's context.

## Ensuring Safe and Trusted dbt Triage with Atlas

Atlas prioritizes safety and trust in dbt triage workflows, especially in 2026, by implementing stringent permission checks and explicit trigger mechanisms. It verifies that the triggering actor possesses `admin` or `write` permissions before executing any actions, preventing unauthorized modifications to your dbt project.

Security is paramount when automating actions on a dbt codebase. Atlas enforces strict permission gating: it checks the triggering actor's collaborator permission and refuses to run for anyone without `admin` or `write` access. Furthermore, to prevent accidental or stray comments from initiating a run, the `atlas github` handler enforces that comments must explicitly mention the configured trigger. Before any changes are made, Atlas drafts a plan in a read-only plan agent and asks for approval. Once approved, it switches to a build agent. Every file edit proposed by Atlas generates a unified diff, which is surfaced for explicit approval, giving dbt developers full control and visibility over automated changes. This multi-layered approach ensures that automated triage actions on your dbt project are always safe and executed only by trusted users.

## Handling dbt Code Context and Large Pull Requests

Atlas efficiently manages the context of dbt projects, even large ones, by indexing code using AST declarations via tree-sitter, not blind line windows. In 2026, it explicitly catches `ContextOverflowError` to provide clear feedback when a dbt pull request exceeds its processing capacity, listing the offending files.

Understanding the intricate relationships within a dbt project is crucial for effective triage. Atlas builds its code index by AST declarations using tree-sitter, which allows it to accurately parse and understand dbt-specific constructs like `ref()` and `source()` calls, `schema.yml` tests, and each model's materialization configuration. This deep understanding enables Atlas to make informed suggestions, such as converting an expensive table model to incremental with a proper `is_incremental()` filter and `unique_key`. For large dbt pull requests or complex issues, Atlas explicitly handles context overflow. A `ContextOverflowError` is caught by name and re-thrown as a 'prompt-too-large' message, clearly listing the offending files. This prevents silent failures and provides actionable feedback to the dbt developer, ensuring transparency and maintainability even with extensive code changes.

## Atlas's dbt-Specific Tooling and Workflow Integration

Atlas integrates deeply with the dbt toolchain, allowing it to perform specific dbt operations like running `dbt test` or formatting SQL with `sqlfmt` directly within a triage workflow. This ensures that automated changes adhere to your project's quality standards in 2026.

Atlas is designed to be an indispensable tool for dbt developers. It can execute real dbt commands as part of its automated triage. For instance, Atlas can run `dbt test` to validate the integrity of proposed changes, ensuring that new models or modifications do not introduce regressions. It can also manage project dependencies by interacting with `dbt deps (packages.yml)`. When suggesting code changes, such as adding `not_null` and `unique` tests to new columns in a `schema.yml` file, Atlas can then format the SQL with `sqlfmt` to maintain consistent code style. Crucially, sensitive operations like running `dbt build` against your development target are always executed behind a permission prompt, never against production environments. This tight integration with the dbt toolchain means Atlas doesn't just suggest changes; it helps enforce best practices and maintain code quality throughout the dbt development lifecycle.

## Steps

1. Ensure your dbt project includes a `dbt_project.yml` and `models/` directory for Atlas to index your model DAG, `schema.yml` tests, and materialization configurations.
2. Configure a GitHub Actions workflow to invoke the `atlas github` command, setting up the necessary triggers for issue or pull request events.
3. Define the `MODEL` input in `provider/model` form and provide the `PROMPT` input for specific event types that require it within your GitHub workflow configuration.
4. Implement permission checks in your GitHub workflow to ensure Atlas only runs when the triggering actor has `admin` or `write` permissions on the dbt repository.
5. Configure the `atlas github` command to require a specific mention in comments, preventing a stray comment from initiating an automated triage run on your dbt project.
6. Review Atlas's proposed changes, which include a unified diff, and approve them before Atlas writes any modifications to your dbt models or `schema.yml` files.
7. Verify Atlas's dbt-specific actions, such as running `dbt test` to validate new schema tests or applying `sqlfmt` to ensure consistent SQL style, before merging changes.

## FAQ

### How does Atlas ensure safety when triaging dbt pull requests?

Atlas ensures safety by checking the triggering actor's `admin` or `write` permissions, requiring an explicit mention to trigger a run, drafting plans in a read-only agent, and presenting a unified diff for approval before writing any changes to your dbt project files.

### Can Atlas run `dbt test` or `sqlfmt` within a GitHub workflow?

Yes, Atlas integrates directly with the dbt toolchain. It can run `dbt test` to validate changes and use `sqlfmt` to format SQL files, ensuring code quality and consistency within your dbt project as part of its triage workflow.

### What dbt project files does Atlas understand for triage?

Atlas understands `dbt_project.yml`, `models/` directories, `schema.yml` files, and `packages.yml`. It parses `ref()` and `source()` calls, schema tests, and materialization configurations to build a comprehensive understanding of your dbt project's DAG.

### How does Atlas prevent unauthorized users from triggering actions on dbt code?

Atlas prevents unauthorized actions by refusing to run if the triggering actor lacks `admin` or `write` permissions. Additionally, it requires a specific mention in comments to activate, ensuring only intentional and authorized triggers proceed.

### What happens if a dbt pull request is too large for Atlas's context window?

If a dbt pull request is too large, Atlas catches the `ContextOverflowError` and re-throws it as a 'prompt-too-large' message. This message explicitly lists the offending files, providing clear feedback rather than failing silently.

### Can Atlas modify dbt materialization strategies or add schema tests?

Yes, Atlas can suggest and implement changes like converting a table model to incremental with `is_incremental()` and `unique_key`, or adding `not_null` and `unique` tests to new columns in `schema.yml`, always requiring approval for such modifications.

### How does Atlas handle dbt project dependencies?

Atlas can interact with dbt's package manager, allowing it to manage project dependencies by running `dbt deps (packages.yml)` as needed within the automated triage workflow.

---

Canonical HTML: https://runatlas.sh/resources/stacks/automate-github-issue-and-pr-triage-in-dbt
Source of truth: aeo_pages row `/resources/stacks/automate-github-issue-and-pr-triage-in-dbt` (segment: Stacks) (this file is generated from it, never hand-edited).
Licence: Atlas is proprietary with a free core. It is not open source and there is no public source repository.
